Class PerSSTableIndexWriter
- java.lang.Object
-
- org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter
-
- All Implemented Interfaces:
SSTableFlushObserver
public class PerSSTableIndexWriter extends java.lang.Object implements SSTableFlushObserver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classPerSSTableIndexWriter.Index
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index>indexes
-
Constructor Summary
Constructors Constructor Description PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin()Called before writing any data to the sstable.voidcomplete()Called when all data is written to the file and it's ready to be finished up.booleanequals(java.lang.Object o)DescriptorgetDescriptor()PerSSTableIndexWriter.IndexgetIndex(ColumnMetadata columnDef)inthashCode()protected longmaxMemorySize(ColumnIndex columnIndex)protected PerSSTableIndexWriter.IndexnewIndex(ColumnIndex columnIndex)voidnextUnfilteredCluster(Unfiltered unfiltered)Called after the unfiltered cluster is written to the sstable.voidstartPartition(DecoratedKey key, long curPosition)Called when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)).
-
-
-
Field Detail
-
indexes
protected final java.util.Map<ColumnMetadata,PerSSTableIndexWriter.Index> indexes
-
-
Constructor Detail
-
PerSSTableIndexWriter
public PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnMetadata,ColumnIndex> supportedIndexes)
-
-
Method Detail
-
begin
public void begin()
Description copied from interface:SSTableFlushObserverCalled before writing any data to the sstable.- Specified by:
beginin interfaceSSTableFlushObserver
-
startPartition
public void startPartition(DecoratedKey key, long curPosition)
Description copied from interface:SSTableFlushObserverCalled when a new partition in being written to the sstable, but before any cells are processed (seeSSTableFlushObserver.nextUnfilteredCluster(Unfiltered)).- Specified by:
startPartitionin interfaceSSTableFlushObserver- Parameters:
key- The key being appended to SSTable.curPosition- The position of the key in the SSTable PRIMARY_INDEX file.
-
nextUnfilteredCluster
public void nextUnfilteredCluster(Unfiltered unfiltered)
Description copied from interface:SSTableFlushObserverCalled after the unfiltered cluster is written to the sstable. Will be preceded by a call tostartPartition(DecoratedKey, long), and the cluster should be assumed to belong to that partition.- Specified by:
nextUnfilteredClusterin interfaceSSTableFlushObserver- Parameters:
unfiltered- The unfiltered cluster being added to SSTable.
-
complete
public void complete()
Description copied from interface:SSTableFlushObserverCalled when all data is written to the file and it's ready to be finished up.- Specified by:
completein interfaceSSTableFlushObserver
-
getIndex
public PerSSTableIndexWriter.Index getIndex(ColumnMetadata columnDef)
-
getDescriptor
public Descriptor getDescriptor()
-
newIndex
protected PerSSTableIndexWriter.Index newIndex(ColumnIndex columnIndex)
-
maxMemorySize
protected long maxMemorySize(ColumnIndex columnIndex)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-