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 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 an UpdatableIndex from 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 new UpdatableIndex to 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 of IndexSegmentsObj. Index container objects that require to "externalize" index elements to a reference index, which requires up to PersistenceParams.maxIndexStripes() will be kept here and not create another indirection via a IndexSegmentsObj.
      See Also: