Class HighContentionAllocator
- java.lang.Object
-
- com.apple.foundationdb.record.provider.foundationdb.layers.interning.HighContentionAllocator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HighContentionAllocator.AllocationWindow
A range of possible values to try.
-
Constructor Summary
Constructors Modifier Constructor Description HighContentionAllocator(FDBRecordContext context, KeySpacePath basePath)
HighContentionAllocator(FDBRecordContext context, KeySpacePath basePath, Function<Long,CompletableFuture<Boolean>> candidateCheck)
HighContentionAllocator(FDBRecordContext context, Subspace counterSubspace, Subspace allocationSubspace)
protected
HighContentionAllocator(FDBRecordContext context, Subspace counterSubspace, Subspace allocationSubspace, Function<Long,CompletableFuture<Boolean>> candidateCheck)
HighContentionAllocator(FDBRecordContext context, Subspace basePathSubspace, Function<Long,CompletableFuture<Boolean>> candidateCheck)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Long>
allocate(String valueToStore)
void
forceAllocate(String key, Long value)
static HighContentionAllocator
forRoot(FDBRecordContext context, KeySpacePath basePath)
static HighContentionAllocator
forRoot(FDBRecordContext context, Subspace counterSubspace, Subspace allocationSubspace)
Subspace
getAllocationSubspace()
void
setWindow(long count)
-
-
-
Constructor Detail
-
HighContentionAllocator
public HighContentionAllocator(@Nonnull FDBRecordContext context, @Nonnull KeySpacePath basePath)
-
HighContentionAllocator
public HighContentionAllocator(@Nonnull FDBRecordContext context, @Nonnull KeySpacePath basePath, @Nonnull Function<Long,CompletableFuture<Boolean>> candidateCheck)
-
HighContentionAllocator
public HighContentionAllocator(@Nonnull FDBRecordContext context, @Nonnull Subspace basePathSubspace, @Nonnull Function<Long,CompletableFuture<Boolean>> candidateCheck)
-
HighContentionAllocator
public HighContentionAllocator(@Nonnull FDBRecordContext context, @Nonnull Subspace counterSubspace, @Nonnull Subspace allocationSubspace)
-
-
Method Detail
-
forRoot
public static HighContentionAllocator forRoot(@Nonnull FDBRecordContext context, @Nonnull Subspace counterSubspace, @Nonnull Subspace allocationSubspace)
-
forRoot
public static HighContentionAllocator forRoot(@Nonnull FDBRecordContext context, @Nonnull KeySpacePath basePath)
-
getAllocationSubspace
public Subspace getAllocationSubspace()
-
allocate
public CompletableFuture<Long> allocate(String valueToStore)
-
setWindow
public void setWindow(long count)
-
-