public interface SecurityStoreFeature extends Feature
Modifier and Type | Interface and Description |
---|---|
static interface |
SecurityStoreFeature.UpdateStoreCallback
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
static interface |
SecurityStoreFeature.UpdateStoreContextCallback<C>
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
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)
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
void |
updateStore(String commandScript,
SecurityStoreFeature.UpdateStoreCallback callback)
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
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;
PermissionsException
– 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.
@Deprecated void updateStore(String commandScript, SecurityStoreFeature.UpdateStoreCallback callback)
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
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@Deprecated <C> void updateStore(String commandScript, C context, SecurityStoreFeature.UpdateStoreContextCallback<C> callback)
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
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 © 2024 DiffusionData Ltd. All Rights Reserved.