|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object me.prettyprint.cassandra.service.template.AbstractColumnFamilyTemplate<K,N>
public class AbstractColumnFamilyTemplate<K,N>
Field Summary | |
---|---|
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 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 Summary | |
---|---|
AbstractColumnFamilyTemplate(Keyspace keyspace,
String columnFamily,
Serializer<K> keySerializer,
Serializer<N> topSerializer)
|
Method Summary | |
---|---|
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()
|
String |
getColumnFamily()
|
long |
getEffectiveClock()
|
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)
|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 Serializer<N> topSerializer
protected boolean batched
protected Long clock
protected ExceptionsTranslator exceptionsTranslator
Constructor Detail |
---|
public AbstractColumnFamilyTemplate(Keyspace keyspace, String columnFamily, Serializer<K> keySerializer, Serializer<N> topSerializer)
Method Detail |
---|
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 Mutator<K> createMutator()
public Long getClock()
public void setClock(Long 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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |