Tracks secondary-index build progress.
Summary
Types
Handle returned while a secondary index is being built.
Option accepted by wait/2.
Keyword options accepted by wait/2.
Functions
Returns the current secondary-index build status.
Blocks until the secondary-index build completes or the timeout is exceeded.
Types
@type t() :: %Aerospike.IndexTask{ conn: GenServer.server(), index_name: String.t(), namespace: String.t() }
Handle returned while a secondary index is being built.
Use status/1 for one poll or wait/2 to block until the index is visible.
wait/2 accepts :poll_interval and :timeout in milliseconds.
@type wait_opt() :: {:poll_interval, non_neg_integer()} | {:timeout, non_neg_integer()}
Option accepted by wait/2.
@type wait_opts() :: [wait_opt()]
Keyword options accepted by wait/2.
Functions
@spec status(t()) :: {:ok, :complete | :in_progress} | {:error, Aerospike.Error.t()}
Returns the current secondary-index build status.
@spec wait(struct(), keyword()) :: :ok | {:error, Aerospike.Error.t()}
@spec wait(t(), wait_opts()) :: :ok | {:error, Aerospike.Error.t()}
Blocks until the secondary-index build completes or the timeout is exceeded.
Supported options:
:poll_interval— milliseconds to sleep between status checks. Defaults to1_000.:timeout— maximum milliseconds to wait. When omitted, polling continues until the index is complete or returns an error.