Package org.apache.guacamole.net.auth
Interface AtomicDirectoryOperation<ObjectType extends Identifiable>
public interface AtomicDirectoryOperation<ObjectType extends Identifiable>
An operation that should be attempted atomically when passed to
Directory.tryAtomically(org.apache.guacamole.net.auth.AtomicDirectoryOperation<ObjectType>)
, if atomic operations are supported by
the Directory.-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeOperation
(boolean atomic, Directory<ObjectType> directory) Attempt the operation atomically.
-
Method Details
-
executeOperation
void executeOperation(boolean atomic, Directory<ObjectType> directory) throws org.apache.guacamole.GuacamoleException Attempt the operation atomically. If the Directory does not support atomic operations, the atomic flag will be set to false. If the atomic flag is set to true, the provided directory is guaranteed to perform the operations within this function atomically. Atomicity of the provided directory outside this function, or of the directory invoking this function are not guaranteed.NOTE: If atomicity is required for this operation, a GuacamoleException may be thrown by this function before any changes are made, ensuring the operation will only ever be performed atomically.
- Parameters:
atomic
- True if the provided directory is guaranteed to perform the operation atomically within the context of this function.directory
- A directory that will perform the operation atomically if the atomic flag is set to true. If the flag is false, the directory may still be used, though atomicity is not guaranteed.- Throws:
org.apache.guacamole.GuacamoleException
- If an issue occurs during the operation.
-