Class Locator
java.lang.Object
com.apple.foundationdb.async.guardiann.Locator
Wires up and holds the shared collaborators of a Guardiann structure: its
StorageAdapter, the
Executor, and the lazily-created Primitives, Search, Insert and
Delete operation objects.-
Constructor Summary
ConstructorsConstructorDescriptionLocator(Subspace subspace, Executor executor, Config config, OnWriteListener onWriteListener, OnReadListener onReadListener) Constructs a newLocator. -
Method Summary
Modifier and TypeMethodDescriptionGet this hnsw's configuration.Get the executor used by this hnsw.Get the on-read listener.Get the on-write listener.Gets the subspace associated with this object.
-
Constructor Details
-
Locator
public Locator(@Nonnull Subspace subspace, @Nonnull Executor executor, @Nonnull Config config, @Nonnull OnWriteListener onWriteListener, @Nonnull OnReadListener onReadListener) Constructs a newLocator.Initializes the Locator with the storage adapter (built from the given subspace, config and listeners) and the executor used for the Guardiann structure's asynchronous operations. All parameters are mandatory and must not be null.
- Parameters:
subspace- theSubspacewhere the data is stored.executor- theExecutorservice to use for concurrent operations.config- theConfigcontaining the Guardiann parameters.onWriteListener- a listener to be notified of write events.onReadListener- a listener to be notified of read events.- Throws:
NullPointerException- if any of the parameters arenull.
-
-
Method Details
-
getSubspace
Gets the subspace associated with this object.- Returns:
- the non-null subspace
-
getExecutor
Get the executor used by this hnsw.- Returns:
- executor used when running asynchronous tasks
-
getConfig
Get this hnsw's configuration.- Returns:
- hnsw configuration
-
getOnWriteListener
Get the on-write listener.- Returns:
- the on-write listener
-
getOnReadListener
Get the on-read listener.- Returns:
- the on-read listener
-