|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.usergrid.persistence.cassandra.CassandraService
public class CassandraService
Field Summary | |
---|---|
static int |
ALL_COUNT
|
static String |
APPLICATIONS_CF
|
static me.prettyprint.cassandra.serializers.BytesArraySerializer |
bae
|
static me.prettyprint.cassandra.serializers.ByteBufferSerializer |
be
|
static me.prettyprint.cassandra.serializers.DynamicCompositeSerializer |
dce
|
static String |
DEFAULT_APPLICATION
|
static UUID |
DEFAULT_APPLICATION_ID
|
static int |
DEFAULT_COUNT
|
static String |
DEFAULT_ORGANIZATION
|
static int |
DEFAULT_SEARCH_COUNT
|
static int |
INDEX_ENTRY_LIST_COUNT
|
static me.prettyprint.cassandra.serializers.LongSerializer |
le
|
static String |
MANAGEMENT_APPLICATION
|
static UUID |
MANAGEMENT_APPLICATION_ID
|
static UUID |
NULL_ID
|
static String |
PRINCIPAL_TOKEN_CF
|
static String |
PROPERTIES_CF
|
static int |
RETRY_COUNT
|
static me.prettyprint.cassandra.serializers.StringSerializer |
se
|
static String |
STATIC_APPLICATION_KEYSPACE
|
static String |
SYSTEM_KEYSPACE
|
static String |
TOKENS_CF
|
static me.prettyprint.cassandra.serializers.UUIDSerializer |
ue
|
static boolean |
USE_VIRTUAL_KEYSPACES
|
Constructor Summary | |
---|---|
CassandraService(Properties properties,
me.prettyprint.hector.api.Cluster cluster,
me.prettyprint.cassandra.service.CassandraHostConfigurator cassandraHostConfigurator,
LockManager lockManager)
|
Method Summary | ||
---|---|---|
void |
checkKeyspaces()
|
|
int |
countColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key)
|
|
void |
createKeyspace(String keyspace,
List<me.prettyprint.hector.api.ddl.ColumnFamilyDefinition> cf_defs)
|
|
long |
createTimestamp()
Create a timestamp based on the TimeResolution set to the cluster. |
|
void |
deleteColumn(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
Object column)
Delete column. |
|
void |
deleteRow(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key)
Delete row. |
|
void |
deleteRow(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
long timestamp)
Delete row. |
|
void |
deleteRow(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
String key)
|
|
Set<String> |
getAllColumnNames(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key)
|
|
List<me.prettyprint.hector.api.beans.HColumn<String,ByteBuffer>> |
getAllColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key)
|
|
|
getAllColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
Gets the columns. |
|
me.prettyprint.hector.api.Keyspace |
getApplicationKeyspace(UUID applicationId)
|
|
me.prettyprint.cassandra.service.CassandraHostConfigurator |
getCassandraHostConfigurator()
|
|
me.prettyprint.hector.api.Cluster |
getCluster()
|
|
|
getColumn(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
N column,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
Gets the column. |
|
me.prettyprint.hector.api.beans.HColumn<String,ByteBuffer> |
getColumn(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
String column)
|
|
|
getColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
N[] columns,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
|
|
List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> |
getColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
Object start,
Object finish,
int count,
boolean reversed)
Gets the columns. |
|
|
getColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
Set<String> columnNames,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
Gets the columns. |
|
me.prettyprint.hector.api.ConsistencyLevelPolicy |
getConsistencyLevelPolicy()
|
|
List<UUID> |
getIdList(me.prettyprint.hector.api.Keyspace ko,
Object key,
Object start,
Object finish,
int count,
boolean reversed,
IndexBucketLocator locator,
UUID applicationId,
String collectionName)
Gets the id list. |
|
me.prettyprint.hector.api.Keyspace |
getKeyspace(String keyspace,
UUID prefix)
|
|
LockManager |
getLockManager()
|
|
Properties |
getProperties()
|
|
Map<String,String> |
getPropertiesMap()
|
|
|
getRowKeyList(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
me.prettyprint.hector.api.Serializer<K> keySerializer)
Gets the row keys as uui ds. |
|
|
getRowKeySet(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
me.prettyprint.hector.api.Serializer<K> keySerializer)
Gets the row keys. |
|
|
getRows(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
List<K> keys,
me.prettyprint.hector.api.Serializer<K> keySerializer,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
Gets the columns. |
|
|
getRows(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
List<K> keys,
Set<String> columnNames,
me.prettyprint.hector.api.Serializer<K> keySerializer,
me.prettyprint.hector.api.Serializer<N> nameSerializer,
me.prettyprint.hector.api.Serializer<V> valueSerializer)
Gets the columns. |
|
me.prettyprint.hector.api.Keyspace |
getSystemKeyspace()
|
|
me.prettyprint.hector.api.Keyspace |
getUsergridApplicationKeyspace()
The Usergrid_Applications keyspace directly |
|
void |
init()
|
|
static String |
keyspaceForApplication(UUID applicationId)
|
|
void |
logKeyspaces()
|
|
Map<ByteBuffer,List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>>> |
multiGetColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
List<?> keys,
Object start,
Object finish,
int count,
boolean reversed)
|
|
static UUID |
prefixForApplication(UUID applicationId)
|
|
void |
setCassandraHostConfigurator(me.prettyprint.cassandra.service.CassandraHostConfigurator chc)
|
|
void |
setCluster(me.prettyprint.hector.api.Cluster cluster)
|
|
void |
setColumn(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
Object columnName,
Object columnValue)
|
|
void |
setColumn(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
Object key,
Object columnName,
Object columnValue,
int ttl)
|
|
void |
setColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
byte[] key,
Map<?,?> map)
Sets the columns. |
|
void |
setColumns(me.prettyprint.hector.api.Keyspace ko,
Object columnFamily,
byte[] key,
Map<?,?> map,
int ttl)
|
|
void |
setConsistencyLevelPolicy(me.prettyprint.hector.api.ConsistencyLevelPolicy consistencyLevelPolicy)
|
|
void |
setIdList(me.prettyprint.hector.api.Keyspace ko,
UUID targetId,
String keyPrefix,
String keySuffix,
List<UUID> keyIds)
Sets the id list. |
|
void |
setLockManager(LockManager lockManager)
|
|
void |
setProperties(Properties properties)
|
|
void |
startClusterHealthCheck()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String SYSTEM_KEYSPACE
public static String STATIC_APPLICATION_KEYSPACE
public static final boolean USE_VIRTUAL_KEYSPACES
public static final String APPLICATIONS_CF
public static final String PROPERTIES_CF
public static final String TOKENS_CF
public static final String PRINCIPAL_TOKEN_CF
public static final int DEFAULT_COUNT
public static final int ALL_COUNT
public static final int INDEX_ENTRY_LIST_COUNT
public static final int DEFAULT_SEARCH_COUNT
public static final int RETRY_COUNT
public static final String DEFAULT_APPLICATION
public static final String DEFAULT_ORGANIZATION
public static final String MANAGEMENT_APPLICATION
public static final UUID MANAGEMENT_APPLICATION_ID
public static final UUID DEFAULT_APPLICATION_ID
public static final me.prettyprint.cassandra.serializers.StringSerializer se
public static final me.prettyprint.cassandra.serializers.ByteBufferSerializer be
public static final me.prettyprint.cassandra.serializers.UUIDSerializer ue
public static final me.prettyprint.cassandra.serializers.BytesArraySerializer bae
public static final me.prettyprint.cassandra.serializers.DynamicCompositeSerializer dce
public static final me.prettyprint.cassandra.serializers.LongSerializer le
public static final UUID NULL_ID
Constructor Detail |
---|
public CassandraService(Properties properties, me.prettyprint.hector.api.Cluster cluster, me.prettyprint.cassandra.service.CassandraHostConfigurator cassandraHostConfigurator, LockManager lockManager)
Method Detail |
---|
public void init() throws Exception
Exception
public me.prettyprint.hector.api.Cluster getCluster()
public void setCluster(me.prettyprint.hector.api.Cluster cluster)
public me.prettyprint.cassandra.service.CassandraHostConfigurator getCassandraHostConfigurator()
public void setCassandraHostConfigurator(me.prettyprint.cassandra.service.CassandraHostConfigurator chc)
public Properties getProperties()
public void setProperties(Properties properties)
public Map<String,String> getPropertiesMap()
public LockManager getLockManager()
public void setLockManager(LockManager lockManager)
public me.prettyprint.hector.api.ConsistencyLevelPolicy getConsistencyLevelPolicy()
public void setConsistencyLevelPolicy(me.prettyprint.hector.api.ConsistencyLevelPolicy consistencyLevelPolicy)
public static String keyspaceForApplication(UUID applicationId)
applicationId
-
public static UUID prefixForApplication(UUID applicationId)
public me.prettyprint.hector.api.Keyspace getKeyspace(String keyspace, UUID prefix)
public me.prettyprint.hector.api.Keyspace getApplicationKeyspace(UUID applicationId)
public me.prettyprint.hector.api.Keyspace getUsergridApplicationKeyspace()
public me.prettyprint.hector.api.Keyspace getSystemKeyspace()
public void createKeyspace(String keyspace, List<me.prettyprint.hector.api.ddl.ColumnFamilyDefinition> cf_defs)
public void checkKeyspaces()
public void logKeyspaces()
public <N,V> List<me.prettyprint.hector.api.beans.HColumn<N,V>> getAllColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the key
Exception
- the exceptionpublic List<me.prettyprint.hector.api.beans.HColumn<String,ByteBuffer>> getAllColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key) throws Exception
Exception
public Set<String> getAllColumnNames(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key) throws Exception
Exception
public List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> getColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, Object start, Object finish, int count, boolean reversed) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keystart
- the startfinish
- the finishcount
- the countreversed
- the reversed
Exception
- the exceptionpublic Map<ByteBuffer,List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>>> multiGetColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, List<?> keys, Object start, Object finish, int count, boolean reversed) throws Exception
Exception
public <K,N,V> me.prettyprint.hector.api.beans.Rows<K,N,V> getRows(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, List<K> keys, me.prettyprint.hector.api.Serializer<K> keySerializer, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykeys
- the keys
Exception
- the exceptionpublic <N,V> List<me.prettyprint.hector.api.beans.HColumn<N,V>> getColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, Set<String> columnNames, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keycolumnNames
- the column names
Exception
- the exceptionpublic <K,N,V> me.prettyprint.hector.api.beans.Rows<K,N,V> getRows(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, List<K> keys, Set<String> columnNames, me.prettyprint.hector.api.Serializer<K> keySerializer, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykeys
- the keyscolumnNames
- the column names
Exception
- the exceptionpublic <N,V> me.prettyprint.hector.api.beans.HColumn<N,V> getColumn(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, N column, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keycolumn
- the column
Exception
- the exceptionpublic <N,V> me.prettyprint.hector.api.beans.ColumnSlice<N,V> getColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, N[] columns, me.prettyprint.hector.api.Serializer<N> nameSerializer, me.prettyprint.hector.api.Serializer<V> valueSerializer) throws Exception
Exception
public me.prettyprint.hector.api.beans.HColumn<String,ByteBuffer> getColumn(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, String column) throws Exception
Exception
public void setColumn(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue) throws Exception
Exception
public void setColumn(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, Object columnName, Object columnValue, int ttl) throws Exception
Exception
public void setColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, byte[] key, Map<?,?> map) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keymap
- the map
Exception
- the exceptionpublic void setColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, byte[] key, Map<?,?> map, int ttl) throws Exception
Exception
public long createTimestamp()
public void deleteColumn(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, Object column) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keycolumn
- the column
Exception
- the exceptionpublic <K> Set<K> getRowKeySet(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, me.prettyprint.hector.api.Serializer<K> keySerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column family
Exception
- the exceptionpublic <K> List<K> getRowKeyList(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, me.prettyprint.hector.api.Serializer<K> keySerializer) throws Exception
keyspace
- the keyspacecolumnFamily
- the column family
Exception
- the exceptionpublic void deleteRow(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the key
Exception
- the exceptionpublic void deleteRow(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, String key) throws Exception
Exception
public void deleteRow(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key, long timestamp) throws Exception
keyspace
- the keyspacecolumnFamily
- the column familykey
- the keytimestamp
- the timestamp
Exception
- the exceptionpublic List<UUID> getIdList(me.prettyprint.hector.api.Keyspace ko, Object key, Object start, Object finish, int count, boolean reversed, IndexBucketLocator locator, UUID applicationId, String collectionName) throws Exception
ko
- the keyspacekey
- the keystart
- the startfinish
- the finishcount
- the countreversed
- True if the scan should be reversedlocator
- The index locator instanceapplicationId
- The applicationIdcollectionName
- The name of the collection to get the Ids for
Exception
- the exceptionpublic int countColumns(me.prettyprint.hector.api.Keyspace ko, Object columnFamily, Object key) throws Exception
Exception
public void setIdList(me.prettyprint.hector.api.Keyspace ko, UUID targetId, String keyPrefix, String keySuffix, List<UUID> keyIds) throws Exception
keyspace
- the keyspacetargetId
- the target idcolumnFamily
- the column familykeyPrefix
- the key prefixkeySuffix
- the key suffixkeyIds
- the key idssetColumnValue
- the set column value
Exception
- the exceptionpublic void startClusterHealthCheck()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |