org.apache.cassandra.cql
Class AbstractModification
java.lang.Object
org.apache.cassandra.cql.AbstractModification
- Direct Known Subclasses:
- DeleteStatement, UpdateStatement
public abstract class AbstractModification
- extends java.lang.Object
Constructor Summary |
AbstractModification(java.lang.String columnFamily,
java.lang.String keyAlias,
Attributes attrs)
|
AbstractModification(java.lang.String columnFamily,
java.lang.String keyAlias,
org.apache.cassandra.thrift.ConsistencyLevel cLevel,
java.lang.Long timestamp,
int timeToLive)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultConsistency
public static final org.apache.cassandra.thrift.ConsistencyLevel defaultConsistency
columnFamily
protected final java.lang.String columnFamily
cLevel
protected final org.apache.cassandra.thrift.ConsistencyLevel cLevel
timestamp
protected final java.lang.Long timestamp
timeToLive
protected final int timeToLive
keyName
protected final java.lang.String keyName
AbstractModification
public AbstractModification(java.lang.String columnFamily,
java.lang.String keyAlias,
Attributes attrs)
AbstractModification
public AbstractModification(java.lang.String columnFamily,
java.lang.String keyAlias,
org.apache.cassandra.thrift.ConsistencyLevel cLevel,
java.lang.Long timestamp,
int timeToLive)
getColumnFamily
public java.lang.String getColumnFamily()
getConsistencyLevel
public org.apache.cassandra.thrift.ConsistencyLevel getConsistencyLevel()
isSetConsistencyLevel
public boolean isSetConsistencyLevel()
- True if an explicit consistency level was parsed from the statement.
- Returns:
- true if a consistency was parsed, false otherwise.
getTimestamp
public long getTimestamp(ClientState clientState)
isSetTimestamp
public boolean isSetTimestamp()
getTimeToLive
public int getTimeToLive()
prepareRowMutations
public abstract java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace,
ClientState clientState)
throws org.apache.cassandra.thrift.InvalidRequestException
- Convert statement into a list of mutations to apply on the server
- Parameters:
keyspace
- The working keyspaceclientState
- current client status
- Returns:
- list of the mutations
- Throws:
org.apache.cassandra.thrift.InvalidRequestException
- on the wrong request
prepareRowMutations
public abstract java.util.List<IMutation> prepareRowMutations(java.lang.String keyspace,
ClientState clientState,
java.lang.Long timestamp)
throws org.apache.cassandra.thrift.InvalidRequestException
- Convert statement into a list of mutations to apply on the server
- Parameters:
keyspace
- The working keyspaceclientState
- current client statustimestamp
- global timestamp to use for all mutations
- Returns:
- list of the mutations
- Throws:
org.apache.cassandra.thrift.InvalidRequestException
- on the wrong request
Copyright © 2011 The Apache Software Foundation