Interface PartitionHolderContents<T>

All Known Implementing Classes:
OvershadowableManager, SimplePartitionHolderContents

public interface PartitionHolderContents<T>
Contents for PartitionHolder.
See Also:
  • Method Details

    • isEmpty

      boolean isEmpty()
      Whether this holder is empty.
    • areVisibleChunksConsistent

      boolean areVisibleChunksConsistent()
      Whether all visible chunks are consistent, meaning they can possibly be considered for PartitionHolder.isComplete(). When segment locking is not being used, all chunks are consistent, so this always returns true.
    • addChunk

      boolean addChunk(PartitionChunk<T> chunk)
      Adds a chunk.
      Returns:
      true if no chunk previously existed with these partition boundaries
    • removeChunk

      @Nullable PartitionChunk<T> removeChunk(PartitionChunk<T> partitionChunk)
      Removes and returns a chunk with the same partition boundaries as the provided chunk. Returns null if no such chunk exists.
    • getChunk

      @Nullable PartitionChunk<T> getChunk(int partitionId)
      Returns the chunk with a given partition ID, or null if none exists.
    • visibleChunksIterator

      Iterator<PartitionChunk<T>> visibleChunksIterator()
      Iterates through all visible chunks. When segment locking is not being used, all chunks are visible, so this returns all chunks.
    • getOvershadowedChunks

      List<PartitionChunk<T>> getOvershadowedChunks()
      Returns chunks that are tracked but not visible. When segment locking is not being used, all chunks are visible, so this returns nothing.
    • copyVisible

      PartitionHolderContents<T> copyVisible()
      Returns a copy of this holder with only visible chunks.
    • deepCopy

      Returns a copy of this holder with all chunks.