Interface IndexContainer<V>
- Type Parameters:
V- value type
@PolarisImmutable
public interface IndexContainer<V>
Container to hold an index, to be used as an attribute in
Objs, see the rules below which
functions to use.
Do not access the embedded() and stripes() attributes directly, use
the indexForRead()/asUpdatableIndex() functions instead.
Do not construct an IndexContainer directly, use the newUpdatableIndex() and asUpdatableIndex() functions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault UpdatableIndex<V> asUpdatableIndex(Persistence persistence, IndexValueSerializer<V> indexValueSerializer) Builds anUpdatableIndexfrom index information in this container, to eventually build a new index container, using the given element serializer.embedded()DO NOT ACCESS DIRECTLY, this is the serialized representation of the "embedded" index.indexForRead(Persistence persistence, IndexValueSerializer<V> indexValueSerializer) Returns a read-only representation of the whole index from index information in this container.static <V> UpdatableIndex<V> newUpdatableIndex(Persistence persistence, IndexValueSerializer<V> indexValueSerializer) Creates a newUpdatableIndexto eventually build a new index container, using the given element serializer.stripes()DO NOT ACCESS DIRECTLY, these are pointers to the composite reference index stripes, an "embedded" version ofIndexSegmentsObj.
-
Method Details
-
indexForRead
default Index<V> indexForRead(@Nonnull Persistence persistence, @Nonnull IndexValueSerializer<V> indexValueSerializer) Returns a read-only representation of the whole index from index information in this container. The returned index cannot be used for any serialization or any other write-intended operations. -
asUpdatableIndex
default UpdatableIndex<V> asUpdatableIndex(@Nonnull Persistence persistence, @Nonnull IndexValueSerializer<V> indexValueSerializer) Builds anUpdatableIndexfrom index information in this container, to eventually build a new index container, using the given element serializer. -
newUpdatableIndex
static <V> UpdatableIndex<V> newUpdatableIndex(@Nonnull Persistence persistence, @Nonnull IndexValueSerializer<V> indexValueSerializer) Creates a newUpdatableIndexto eventually build a new index container, using the given element serializer. -
embedded
ByteBuffer embedded()DO NOT ACCESS DIRECTLY, this is the serialized representation of the "embedded" index. -
stripes
List<IndexStripe> stripes()DO NOT ACCESS DIRECTLY, these are pointers to the composite reference index stripes, an "embedded" version ofIndexSegmentsObj. Index container objects that require to "externalize" index elements to a reference index, which requires up toPersistenceParams.maxIndexStripes()will be kept here and not create another indirection via aIndexSegmentsObj.- See Also:
-