DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Ignite#withApplicationAttributes. It returns Ignite instance that is aware of the attributes.GridIoSecurityAwareMessage)Application attributes set to ThreadLocal<Map<String, String>> in each thread that process operation (similar to SecurityContext#withSecurityContext() ).| Code Block | ||
|---|---|---|
| ||
// Example of usage.
try (Ignite ign = Ignition.start(ignCfg)) {
Map<String, String> appAttrs = F.asMap("SESSION_ID", "1234");
IgniteCache<?, ?> cache = ign.cache("CACHE")Ignite app = Ignite.withApplicationAttributes(appAttrs);
...
}
|
...
ClientCache#withApplicationAttributes IgniteClient#withApplicationAttributes.ClientBitmaskFeature protocol....
| Code Block | ||
|---|---|---|
| ||
// Example of usage.
try (IgniteClient cln = Ignition.startClient(clnCfg)) {
Map<String, String> appAttrs = F.asMap("SESSION_ID", "1234");
ClientCache<?, ?> cache IgniteClient app = cln.cache("CACHE").withApplicationAttributes(appAttrs);
...
}
|
...
ApplicationContext SessionContext is an entrypoint for accessing all non-tabular data.QuerySqlFunction are static, CacheInterceptor is a cache singleton).QuerySqlFunction to get access to the attributes in SQL queries if needed (see example below)....
| Code Block | ||
|---|---|---|
| ||
/** ApplicationContextSessionContext interface. It's an entrypoint for all non-tabular dataattributes. */ public class ApplicationContextSessionContext { /** @return ApplicationCall, attributesapplication setand foruser current threadattributes. */ public static @Nullable Map<String, String> getAttributes(); /** @return Current SecuritySubject. */ public static @Nullable SecuritySubject getSecuritySubject(); } /** Example, use it in QuerySqlFunction. */ public static class UserDefinedFunctions { /** */ @SessionContextProviderResource public SessionContextProvider sesCtxProv; /** @return Session ID set with application attributes. */ @QuerySqlFunction public static @Nullable String sessionId() { Map<String, String> appAttrs = ApplicationContext.getAttributes(); return appAttrs == null ? null : appAttr.get("SESSION_ID"); } } |
...