Class Locator
java.lang.Object
com.apple.foundationdb.async.hnsw.Locator
A basic wrapper around the fundamental access information we need to interact with an HNSW.
-
Constructor Summary
ConstructorsConstructorDescriptionLocator(Subspace subspace, Executor executor, Config config, OnWriteListener onWriteListener, OnReadListener onReadListener) Constructs a new HNSW graph instance. -
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 new HNSW graph instance.This constructor initializes the HNSW graph with the necessary components for storage, execution, configuration, and event handling. All parameters are mandatory and must not be null.
- Parameters:
subspace- theSubspacewhere the graph data is stored.executor- theExecutorservice to use for concurrent operations.config- theConfigobject containing HNSW algorithm parameters.onWriteListener- a listener to be notified of write events on the graph.onReadListener- a listener to be notified of read events on the graph.- 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
-