public interface SecurityStoreFeature extends Feature
Modifier and Type | Interface and Description |
---|---|
static interface |
SecurityStoreFeature.UpdateStoreCallback
The callback interface for use with
updateStore . |
static interface |
SecurityStoreFeature.UpdateStoreContextCallback<C>
The contextual callback interface for use with
updateStore . |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<?> |
updateStore(String commandScript)
Send a command script to the server to update the security store.
|
<C> void |
updateStore(String commandScript,
C context,
SecurityStoreFeature.UpdateStoreContextCallback<C> callback)
Send a command script to the server to update the security store, with a
contextual callback.
|
void |
updateStore(String commandScript,
SecurityStoreFeature.UpdateStoreCallback callback)
Send a command script to the server to update the security store.
|
getSession
CompletableFuture<?> updateStore(String commandScript)
The script may be generated using a ScriptBuilder
obtained from
the feature.
Each line of script
is a command to update the store.
The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.
If the server is configured for topic replication then the changes will be replicated to all members of the cluster.
commandScript
- the scriptIf the request was successful, the CompletableFuture will complete successfully. The result type is any rather than Void to provide forward compatibility with future iterations of this API that may provide a non-null result with a more specific result type.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException
. Common reasons for failure, listed
by the exception reported as the
cause
, include:
ScriptException
– if commandScript
is
invalid;
SessionSecurityException
– if the session does
not have MODIFY_SECURITY
permission;
ClusterRoutingException
– if the operation failed
due to a transient cluster error;
SessionClosedException
– if the session is
closed.
void updateStore(String commandScript, SecurityStoreFeature.UpdateStoreCallback callback)
The script may be generated using a ScriptBuilder
obtained from
the feature.
Each line of script
is a command to update the store.
The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.
commandScript
- the scriptcallback
- the result of applying the script<C> void updateStore(String commandScript, C context, SecurityStoreFeature.UpdateStoreContextCallback<C> callback)
The script may be generated using a ScriptBuilder
obtained from
the feature.
Each line of script
is a command to update the store.
The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.
C
- the context typecommandScript
- the scriptcontext
- the context to pass to the callback. May be null.callback
- the result of applying the scriptCopyright © 2020 Push Technology Ltd. All Rights Reserved.