Class OnlineIndexer.IndexFromIndexPolicy.Builder
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.OnlineIndexer.IndexFromIndexPolicy.Builder
-
- Enclosing class:
- OnlineIndexer.IndexFromIndexPolicy
@API(UNSTABLE) public static class OnlineIndexer.IndexFromIndexPolicy.Builder extends Object
Builder forOnlineIndexer.IndexFromIndexPolicy
.
Forbid fallback:OnlineIndexer.IndexFromIndexPolicy.newBuilder().setSourceIndex("src_index").build()
OnlineIndexer.IndexFromIndexPolicy.newBuilder().setSourceIndex("src_index").forbidRecordScan().build()
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnlineIndexer.IndexFromIndexPolicy
build()
OnlineIndexer.IndexFromIndexPolicy.Builder
forbidRecordScan()
After calling this function, throw an exception if the source index cannot be used to build the target index.OnlineIndexer.IndexFromIndexPolicy.Builder
setSourceIndex(String sourceIndex)
Set a source index to scan.
-
-
-
Method Detail
-
setSourceIndex
public OnlineIndexer.IndexFromIndexPolicy.Builder setSourceIndex(@Nonnull String sourceIndex)
Set a source index to scan. Some sanity checks will be performed, but it is the caller's responsibility to verify that this source is indexing all the relevant records for the target index.- Parameters:
sourceIndex
- an existing, readable, index.- Returns:
- this builder
-
forbidRecordScan
public OnlineIndexer.IndexFromIndexPolicy.Builder forbidRecordScan()
After calling this function, throw an exception if the source index cannot be used to build the target index. The default behaviour (if this function isn't called) would be performing a full record scan.- Returns:
- this builder
-
build
public OnlineIndexer.IndexFromIndexPolicy build()
-
-