|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.Table
public class Table
It represents a Keyspace.
Field Summary | |
---|---|
java.lang.String |
name
|
static java.util.concurrent.locks.ReentrantReadWriteLock |
switchLock
accesses to CFS.memtable should acquire this for thread safety. |
static java.lang.String |
SYSTEM_TABLE
|
Method Summary | |
---|---|
static java.lang.Iterable<Table> |
all()
|
void |
apply(RowMutation mutation,
boolean writeCommitLog)
|
void |
apply(RowMutation mutation,
boolean writeCommitLog,
boolean updateIndexes)
This method adds the row to the Commit Log associated with this table. |
static Table |
clear(java.lang.String table)
|
static Table |
clear(java.lang.String table,
Schema schema)
|
void |
clearSnapshot(java.lang.String snapshotName)
Clear all the snapshots for a given table. |
void |
createReplicationStrategy(KSMetaData ksm)
|
void |
dropCf(java.lang.Integer cfId)
|
java.util.List<java.util.concurrent.Future<?>> |
flush()
|
void |
forceCleanup(NodeId.OneShotRenewer renewer)
Do a cleanup of keys that do not belong locally. |
java.util.List<SSTableReader> |
getAllSSTables()
|
ColumnFamilyStore |
getColumnFamilyStore(java.lang.Integer id)
|
ColumnFamilyStore |
getColumnFamilyStore(java.lang.String cfName)
|
java.util.Collection<ColumnFamilyStore> |
getColumnFamilyStores()
|
AbstractReplicationStrategy |
getReplicationStrategy()
|
Row |
getRow(QueryFilter filter)
|
static java.lang.String |
getTimestampedSnapshotName(java.lang.String clientSuppliedName)
|
static void |
indexRow(DecoratedKey<?> key,
ColumnFamilyStore cfs,
java.util.SortedSet<java.nio.ByteBuffer> indexedColumns)
|
void |
initCf(java.lang.Integer cfId,
java.lang.String cfName,
boolean loadSSTables)
adds a cf to internal structures, ends up creating disk files). |
static Table |
open(java.lang.String table)
|
static Table |
openWithoutSSTables(java.lang.String table)
|
void |
snapshot(java.lang.String snapshotName,
java.lang.String columnFamilyName)
Take a snapshot of the specific column family, or the entire set of column families if columnFamily is null with a given timestamp |
boolean |
snapshotExists(java.lang.String snapshotName)
Check whether snapshots already exists for a given name. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SYSTEM_TABLE
public static final java.util.concurrent.locks.ReentrantReadWriteLock switchLock
public final java.lang.String name
Method Detail |
---|
public static Table open(java.lang.String table)
public static Table openWithoutSSTables(java.lang.String table)
public static Table clear(java.lang.String table) throws java.io.IOException
java.io.IOException
public static Table clear(java.lang.String table, Schema schema) throws java.io.IOException
java.io.IOException
public java.util.Collection<ColumnFamilyStore> getColumnFamilyStores()
public ColumnFamilyStore getColumnFamilyStore(java.lang.String cfName)
public ColumnFamilyStore getColumnFamilyStore(java.lang.Integer id)
public void forceCleanup(NodeId.OneShotRenewer renewer) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void snapshot(java.lang.String snapshotName, java.lang.String columnFamilyName) throws java.io.IOException
snapshotName
- the tag associated with the name of the snapshot. This value may not be nullcolumnFamilyName
- the column family to snapshot or all on null
java.io.IOException
- if the column family doesn't existpublic static java.lang.String getTimestampedSnapshotName(java.lang.String clientSuppliedName)
clientSuppliedName
- may be null.
public boolean snapshotExists(java.lang.String snapshotName)
snapshotName
- the user supplied snapshot name
public void clearSnapshot(java.lang.String snapshotName) throws java.io.IOException
snapshotName
- the user supplied snapshot name. It empty or null,
all the snapshots will be cleaned
java.io.IOException
public java.util.List<SSTableReader> getAllSSTables()
public void createReplicationStrategy(KSMetaData ksm) throws ConfigurationException
ConfigurationException
public void dropCf(java.lang.Integer cfId) throws java.io.IOException
java.io.IOException
public void initCf(java.lang.Integer cfId, java.lang.String cfName, boolean loadSSTables)
public Row getRow(QueryFilter filter) throws java.io.IOException
java.io.IOException
public void apply(RowMutation mutation, boolean writeCommitLog) throws java.io.IOException
java.io.IOException
public void apply(RowMutation mutation, boolean writeCommitLog, boolean updateIndexes) throws java.io.IOException
java.io.IOException
public AbstractReplicationStrategy getReplicationStrategy()
public static void indexRow(DecoratedKey<?> key, ColumnFamilyStore cfs, java.util.SortedSet<java.nio.ByteBuffer> indexedColumns)
key
- row to indexcfs
- ColumnFamily to index row inindexedColumns
- columns to index, in comparator orderpublic java.util.List<java.util.concurrent.Future<?>> flush() throws java.io.IOException
java.io.IOException
public static java.lang.Iterable<Table> all()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |