public class AbstractColumnFamilyTemplate<K,N> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HSlicePredicate<N> |
activeSlicePredicate |
static int |
ALL_COLUMNS_COUNT |
static Object |
ALL_COLUMNS_END |
static Object |
ALL_COLUMNS_START |
protected boolean |
batched
By default, execute updates automatically at common-sense points such as
after queuing the updates of all an object's properties.
|
protected Long |
clock
An optional clock value to pass to deletes.
|
protected ColumnFactory |
columnFactory |
protected String |
columnFamily |
protected org.apache.cassandra.thrift.ColumnParent |
columnParent |
protected Map<N,Serializer<?>> |
columnValueSerializers |
protected ConsistencyLevelPolicy |
consistencyLevelPolicy |
protected ExceptionsTranslator |
exceptionsTranslator |
protected Serializer<K> |
keySerializer |
protected Keyspace |
keyspace |
protected Serializer<N> |
topSerializer
The serializer for a standard column name or a super-column name
|
| Constructor and Description |
|---|
AbstractColumnFamilyTemplate(Keyspace keyspace,
String columnFamily,
Serializer<K> keySerializer,
Serializer<N> topSerializer) |
| Modifier and Type | Method and Description |
|---|---|
AbstractColumnFamilyTemplate<K,N> |
addColumn(N columnName,
Serializer<?> valueSerializer)
Add a column to the static set of columns which will be used in constructing
the single-argument form of slicing operations
|
Mutator<K> |
createMutator() |
void |
deleteColumn(K key,
N columnName)
Immediately delete this column as a single mutation operation
|
void |
deleteColumn(Mutator<K> mutator,
K key,
N columnName)
Stage this column deletion into the pending mutator.
|
void |
deleteRow(K key)
Immediately delete this row in a single mutation operation
|
void |
deleteRow(Mutator<K> mutator,
K key)
Stage this deletion into the provided mutator calling executeIfNotBatched(Mutator)
|
MutationResult |
executeBatch(Mutator<K> mutator) |
protected MutationResult |
executeIfNotBatched(AbstractTemplateUpdater<K,N> updater) |
protected MutationResult |
executeIfNotBatched(Mutator<K> mutator) |
long |
getClock()
Wrapped call to keyspace.createClock
To Specify a clock for a group of operations, use
AbstractTemplateUpdater instead |
String |
getColumnFamily() |
long |
getEffectiveClock()
Deprecated.
does the same thing as getClock() will be removed in a future release
|
Serializer<K> |
getKeySerializer() |
Serializer<N> |
getTopSerializer() |
Serializer<?> |
getValueSerializer(N columnName)
Get the value serializer for a given column.
|
boolean |
isBatched() |
AbstractColumnFamilyTemplate<K,N> |
setBatched(boolean batched) |
void |
setClock(Long clock)
Deprecated.
(and not thread-safe). Set clocks on the
AbstractTemplateUpdater
implementation as needed. |
void |
setColumnFactory(ColumnFactory columnFactory) |
void |
setCount(int count)
The number of columns to return when not doing a name-based template
|
void |
setExceptionsTranslator(ExceptionsTranslator exceptionsTranslator) |
public static final int ALL_COLUMNS_COUNT
public static final Object ALL_COLUMNS_START
public static final Object ALL_COLUMNS_END
protected Keyspace keyspace
protected String columnFamily
protected Serializer<K> keySerializer
protected Map<N,Serializer<?>> columnValueSerializers
protected org.apache.cassandra.thrift.ColumnParent columnParent
protected HSlicePredicate<N> activeSlicePredicate
protected ColumnFactory columnFactory
protected ConsistencyLevelPolicy consistencyLevelPolicy
protected Serializer<N> topSerializer
protected boolean batched
protected Long clock
protected ExceptionsTranslator exceptionsTranslator
public AbstractColumnFamilyTemplate(Keyspace keyspace, String columnFamily, Serializer<K> keySerializer, Serializer<N> topSerializer)
public AbstractColumnFamilyTemplate<K,N> addColumn(N columnName, Serializer<?> valueSerializer)
columnName - valueSerializer - public Serializer<?> getValueSerializer(N columnName)
columnName - public boolean isBatched()
public AbstractColumnFamilyTemplate<K,N> setBatched(boolean batched)
public String getColumnFamily()
public Serializer<K> getKeySerializer()
public Serializer<N> getTopSerializer()
public MutationResult executeBatch(Mutator<K> mutator)
public long getClock()
AbstractTemplateUpdater insteadpublic void setClock(Long clock)
AbstractTemplateUpdater
implementation as needed.clock - public long getEffectiveClock()
public void setExceptionsTranslator(ExceptionsTranslator exceptionsTranslator)
public void setColumnFactory(ColumnFactory columnFactory)
protected MutationResult executeIfNotBatched(Mutator<K> mutator)
protected MutationResult executeIfNotBatched(AbstractTemplateUpdater<K,N> updater)
public void deleteRow(K key)
key - public void deleteRow(Mutator<K> mutator, K key)
mutator - key - public void deleteColumn(K key, N columnName)
key - columnName - public void deleteColumn(Mutator<K> mutator, K key, N columnName)
mutator - key - columnName - public void setCount(int count)
count - Copyright © 2014. All Rights Reserved.