Package org.apache.cassandra.io.sstable
Class SSTableZeroCopyWriter
- java.lang.Object
-
- org.apache.cassandra.io.sstable.SSTable
-
- org.apache.cassandra.io.sstable.SSTableZeroCopyWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,SSTableMultiWriter
,Transactional
public class SSTableZeroCopyWriter extends SSTable implements SSTableMultiWriter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.io.sstable.SSTable
SSTable.Builder<S extends SSTable,B extends SSTable.Builder<S,B>>, SSTable.Owner
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Transactional
Transactional.AbstractTransactional
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.io.sstable.SSTable
chunkCache, components, compression, descriptor, ioOptions, metadata, TOMBSTONE_HISTOGRAM_BIN_SIZE, TOMBSTONE_HISTOGRAM_SPOOL_SIZE, TOMBSTONE_HISTOGRAM_TTL_ROUND_SECONDS
-
-
Constructor Summary
Constructors Constructor Description SSTableZeroCopyWriter(SSTable.Builder<?,?> builder, LifecycleNewTracker lifecycleNewTracker, SSTable.Owner owner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
abort(java.lang.Throwable accumulate)
void
append(UnfilteredRowIterator partition)
Writes a partition in an implementation specific wayvoid
close()
java.lang.Throwable
commit(java.lang.Throwable accumulate)
java.util.Collection<SSTableReader>
finish(boolean openResult)
java.util.Collection<SSTableReader>
finished()
AbstractBounds<Token>
getBounds()
long
getBytesWritten()
DecoratedKey
getFirst()
DecoratedKey
getLast()
long
getOnDiskBytesWritten()
TableId
getTableId()
void
prepareToCommit()
SSTableMultiWriter
setOpenResult(boolean openResult)
void
writeComponent(Component component, DataInputPlus in, long size)
-
Methods inherited from class org.apache.cassandra.io.sstable.SSTable
addComponents, copy, decorateKey, getAllFilePaths, getColumnFamilyName, getComponents, getFilename, getKeyspaceName, getPartitioner, getStreamingComponents, hardlink, metadata, owner, registerComponents, rename, toString, tryComponentFromFilename, tryComponentFromFilename, tryDescriptorFromFile, unbuildTo, unregisterComponents, validateRepairedMetadata
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.io.sstable.SSTableMultiWriter
getFilename
-
-
-
-
Constructor Detail
-
SSTableZeroCopyWriter
public SSTableZeroCopyWriter(SSTable.Builder<?,?> builder, LifecycleNewTracker lifecycleNewTracker, SSTable.Owner owner)
-
-
Method Detail
-
getFirst
public DecoratedKey getFirst()
-
getLast
public DecoratedKey getLast()
-
getBounds
public AbstractBounds<Token> getBounds()
-
append
public void append(UnfilteredRowIterator partition)
Description copied from interface:SSTableMultiWriter
Writes a partition in an implementation specific way- Specified by:
append
in interfaceSSTableMultiWriter
- Parameters:
partition
- the partition to append
-
finish
public java.util.Collection<SSTableReader> finish(boolean openResult)
- Specified by:
finish
in interfaceSSTableMultiWriter
-
finished
public java.util.Collection<SSTableReader> finished()
- Specified by:
finished
in interfaceSSTableMultiWriter
-
setOpenResult
public SSTableMultiWriter setOpenResult(boolean openResult)
- Specified by:
setOpenResult
in interfaceSSTableMultiWriter
-
getBytesWritten
public long getBytesWritten()
- Specified by:
getBytesWritten
in interfaceSSTableMultiWriter
-
getOnDiskBytesWritten
public long getOnDiskBytesWritten()
- Specified by:
getOnDiskBytesWritten
in interfaceSSTableMultiWriter
-
getTableId
public TableId getTableId()
- Specified by:
getTableId
in interfaceSSTableMultiWriter
-
commit
public java.lang.Throwable commit(java.lang.Throwable accumulate)
- Specified by:
commit
in interfaceTransactional
-
abort
public java.lang.Throwable abort(java.lang.Throwable accumulate)
- Specified by:
abort
in interfaceTransactional
-
prepareToCommit
public void prepareToCommit()
- Specified by:
prepareToCommit
in interfaceTransactional
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceTransactional
-
writeComponent
public void writeComponent(Component component, DataInputPlus in, long size) throws java.nio.channels.ClosedChannelException
- Throws:
java.nio.channels.ClosedChannelException
-
-