Class OnlineIndexer.IndexFromIndexPolicy
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.OnlineIndexer.IndexFromIndexPolicy
-
- Enclosing class:
- OnlineIndexer
public static class OnlineIndexer.IndexFromIndexPolicy extends Object
A builder for the indexFromIndex policy. Let the caller set a source index and a fallback policy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OnlineIndexer.IndexFromIndexPolicy.Builder
Builder forOnlineIndexer.IndexFromIndexPolicy
.
-
Field Summary
Fields Modifier and Type Field Description static OnlineIndexer.IndexFromIndexPolicy
INACTIVE
-
Constructor Summary
Constructors Constructor Description IndexFromIndexPolicy()
Build a non-active object.IndexFromIndexPolicy(String sourceIndex, boolean allowRecordScan)
Build the index from a source index.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSourceIndex()
If active, get the source index.boolean
isActive()
Check if active.boolean
isAllowRecordScan()
If source index is not available, check if allowed to scan the records.static OnlineIndexer.IndexFromIndexPolicy.Builder
newBuilder()
Create a index from index policy builder.
-
-
-
Field Detail
-
INACTIVE
public static final OnlineIndexer.IndexFromIndexPolicy INACTIVE
-
-
Constructor Detail
-
IndexFromIndexPolicy
public IndexFromIndexPolicy(@Nonnull String sourceIndex, boolean allowRecordScan)
Build the index from a source index. Source index must be readable, idempotent, and fully cover the target index.- Parameters:
sourceIndex
- source indexallowRecordScan
- allow fallback to record scan
-
IndexFromIndexPolicy
public IndexFromIndexPolicy()
Build a non-active object.
-
-
Method Detail
-
isActive
public boolean isActive()
Check if active.- Returns:
- True if active
-
getSourceIndex
@Nullable public String getSourceIndex()
If active, get the source index.- Returns:
- source index name
-
isAllowRecordScan
public boolean isAllowRecordScan()
If source index is not available, check if allowed to scan the records.- Returns:
true
if a record scan is allowed
-
newBuilder
@Nonnull public static OnlineIndexer.IndexFromIndexPolicy.Builder newBuilder()
Create a index from index policy builder.- Returns:
- a new
OnlineIndexer.IndexFromIndexPolicy
builder
-
-