|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.io.sstable.AbstractSSTableSimpleWriter
public abstract class AbstractSSTableSimpleWriter
Field Summary | |
---|---|
protected ColumnFamily |
columnFamily
|
protected DecoratedKey |
currentKey
|
protected SuperColumn |
currentSuperColumn
|
protected java.io.File |
directory
|
protected CFMetaData |
metadata
|
protected NodeId |
nodeid
|
Constructor Summary | |
---|---|
AbstractSSTableSimpleWriter(java.io.File directory,
CFMetaData metadata)
|
Method Summary | |
---|---|
void |
addColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
Insert a new "regular" column to the current row (and super column if applicable). |
void |
addCounterColumn(java.nio.ByteBuffer name,
long value)
Insert a new counter column to the current row (and super column if applicable). |
void |
addExpiringColumn(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp,
int ttl,
long expirationTimestampMS)
Insert a new expiring column to the current row (and super column if applicable). |
abstract void |
close()
Close this writer. |
protected abstract ColumnFamily |
getColumnFamily()
|
protected SSTableWriter |
getWriter()
|
void |
newRow(java.nio.ByteBuffer key)
Start a new row whose key is key . |
void |
newSuperColumn(java.nio.ByteBuffer name)
Start a new super column with name name . |
protected abstract void |
writeRow(DecoratedKey key,
ColumnFamily columnFamily)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.io.File directory
protected final CFMetaData metadata
protected DecoratedKey currentKey
protected ColumnFamily columnFamily
protected SuperColumn currentSuperColumn
protected final NodeId nodeid
Constructor Detail |
---|
public AbstractSSTableSimpleWriter(java.io.File directory, CFMetaData metadata)
Method Detail |
---|
protected SSTableWriter getWriter() throws java.io.IOException
java.io.IOException
public void newRow(java.nio.ByteBuffer key) throws java.io.IOException
key
.
key
- the row key
java.io.IOException
public void newSuperColumn(java.nio.ByteBuffer name)
name
.
name
- the name for the super columnpublic void addColumn(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp)
name
- the column namevalue
- the column valuetimestamp
- the column timestamppublic void addExpiringColumn(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, int ttl, long expirationTimestampMS)
name
- the column namevalue
- the column valuetimestamp
- the column timestampttl
- the column time to live in secondsexpirationTimestamp
- the local expiration timestamp in milliseconds. This is the server time timestamp used for actually
expiring the column, and as a consequence should be synchronized with the cassandra servers time. If timestamp
represents
the insertion time in microseconds (which is not required), this should be (timestamp / 1000) + (ttl * 1000)
.public void addCounterColumn(java.nio.ByteBuffer name, long value)
name
- the column namevalue
- the value of the counterpublic abstract void close() throws java.io.IOException
java.io.IOException
protected abstract void writeRow(DecoratedKey key, ColumnFamily columnFamily) throws java.io.IOException
java.io.IOException
protected abstract ColumnFamily getColumnFamily()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |