|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IStorageManager
This class represent the DAO pattern: Access to data varies depending on the source of the data. Access to persistent storage, such as to a database, varies greatly depending on the type of storage Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data.
Field Summary | |
---|---|
static org.apache.cassandra.thrift.ConsistencyLevel |
consistencyOnRead
|
static org.apache.cassandra.thrift.ConsistencyLevel |
consistencyOnWrite
Default ConsistencyLevel |
Method Summary | |
---|---|
int |
countColumns(java.lang.String tableName,
java.lang.String key)
Count columns in record |
void |
insertColumn(java.lang.String tableName,
java.lang.String primaryKey,
java.lang.String columnName,
byte[] value)
Update the value of a Simple Column |
void |
insertSlice(java.lang.String tableName,
java.lang.String primaryKey,
java.util.Map<java.lang.String,byte[]> args)
Insert a new entry in the database |
void |
insertSuperColumn(java.lang.String tableName,
java.lang.String key,
java.lang.String superColumn,
java.lang.String columnName,
byte[] value)
Update the value of a Super Column |
void |
insertSuperSlice(java.lang.String superTableName,
java.lang.String key,
java.lang.String superKey,
java.util.Map<java.lang.String,byte[]> args)
Insert a new entry in the database |
void |
removeAll(java.lang.String tableName,
java.lang.String key)
Remove an entry in the columnFamily |
void |
removeColumn(java.lang.String tableName,
java.lang.String key,
java.lang.String columnName)
Remove a specific column defined by the columnName |
void |
removeSuperColumn(java.lang.String tableName,
java.lang.String key,
java.lang.String superColumnName)
|
java.util.Map<byte[],byte[]> |
selectAll(java.lang.String tableName,
java.lang.String primaryKey)
Get the value of a Column family |
byte[] |
selectColumn(java.lang.String tableName,
java.lang.String primaryKey,
java.lang.String columnName)
Get the value of an entry column |
java.util.List<java.util.Map<byte[],byte[]>> |
selectList(java.lang.String tableName,
java.lang.String key)
Get the list of values of a Super Column Family |
java.util.Map<byte[],byte[]> |
selectRange(java.lang.String tableName,
java.lang.String primaryKey,
java.util.List<java.lang.String> columnNames)
Get the values of a range of columns |
Field Detail |
---|
static final org.apache.cassandra.thrift.ConsistencyLevel consistencyOnWrite
static final org.apache.cassandra.thrift.ConsistencyLevel consistencyOnRead
Method Detail |
---|
void insertSlice(java.lang.String tableName, java.lang.String primaryKey, java.util.Map<java.lang.String,byte[]> args) throws IOBackEndException, InternalBackEndException
tableName
- the name of the Table/ColumnFamilyprimaryKey
- the ID of the entryargs
- All columnName and the their value
IOBackEndException
InternalBackEndException
void insertSuperSlice(java.lang.String superTableName, java.lang.String key, java.lang.String superKey, java.util.Map<java.lang.String,byte[]> args) throws IOBackEndException, InternalBackEndException
superTableName
- the name of the Table/SuperColumnFamilykey
- the ID of the entrysuperKey
- the ID of the entry in the SuperColumnFamilyargs
- All columnName and the their value
ServiceManagerException
InternalBackEndException
IOBackEndException
byte[] selectColumn(java.lang.String tableName, java.lang.String primaryKey, java.lang.String columnName) throws IOBackEndException, InternalBackEndException
tableName
- the name of the Table/ColumnFamilyprimaryKey
- the ID of the entrycolumnName
- the name of the column
IOBackEndException
InternalBackEndException
void insertColumn(java.lang.String tableName, java.lang.String primaryKey, java.lang.String columnName, byte[] value) throws InternalBackEndException
tableName
- the name of the Table/ColumnFamilyprimaryKey
- the ID of the entrycolumnName
- the name of the columnvalue
- the value updated
InternalBackEndException
void insertSuperColumn(java.lang.String tableName, java.lang.String key, java.lang.String superColumn, java.lang.String columnName, byte[] value) throws InternalBackEndException
tableName
- the name of the Table/ColumnFamilykey
- the ID of the entrysuperColumn
- the ID of the superColumncolumnName
- the name of the columnvalue
- the value updated
InternalBackEndException
java.util.Map<byte[],byte[]> selectAll(java.lang.String tableName, java.lang.String primaryKey) throws IOBackEndException, InternalBackEndException
tableName
- the name of the Table/ColumnFamilyprimaryKey
- the ID of the entrycolumnName
- the name of the column
IOBackEndException
InternalBackEndException
java.util.List<java.util.Map<byte[],byte[]>> selectList(java.lang.String tableName, java.lang.String key) throws InternalBackEndException, IOBackEndException
tableName
- key
-
InternalBackEndException
IOBackEndException
java.util.Map<byte[],byte[]> selectRange(java.lang.String tableName, java.lang.String primaryKey, java.util.List<java.lang.String> columnNames) throws IOBackEndException, InternalBackEndException
tableName
- the name of the Table/ColumnFamilyprimaryKey
- the ID of the entrycolumnNames
- the name of the columns to return the values
IOBackEndException
InternalBackEndException
int countColumns(java.lang.String tableName, java.lang.String key) throws InternalBackEndException
key
- parent
-
InternalBackEndException
void removeColumn(java.lang.String tableName, java.lang.String key, java.lang.String columnName) throws IOBackEndException, InternalBackEndException
keyspace
- columnFamily
- key
- columnName
-
IOBackEndException
InternalBackEndException
void removeSuperColumn(java.lang.String tableName, java.lang.String key, java.lang.String superColumnName) throws InternalBackEndException
tableName
- key
- superColumnName
-
InternalBackEndException
void removeAll(java.lang.String tableName, java.lang.String key) throws InternalBackEndException
keyspace
- columnFamily
- key
-
InternalBackEndException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |