Interface SecurityStoreFeature
- All Superinterfaces:
Feature
- All Known Subinterfaces:
SecurityControl
,SystemAuthenticationControl
- Since:
- 5.3
- Author:
- DiffusionData Limited
-
Method Summary
Modifier and TypeMethodDescriptionupdateStore
(String commandScript) Send a command script to the server to update the security store.Methods inherited from interface com.pushtechnology.diffusion.client.session.Feature
getSession
-
Method Details
-
updateStore
Send a command script to the server to update the security store.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.
- Parameters:
commandScript
- the script- Returns:
- a CompletableFuture that completes when a response is received
from the server.
If 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 thecause
, include:ScriptException
– ifcommandScript
is invalid;PermissionsException
– if the session does not haveMODIFY_SECURITY
permission;ClusterRoutingException
– if the operation failed due to a transient cluster error;SessionClosedException
– if the session is closed.
- Since:
- 6.0
-