|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.service.StorageProxy
public class StorageProxy
| Nested Class Summary | |
|---|---|
static interface |
StorageProxy.WritePerformer
|
| Field Summary | |
|---|---|
static StorageProxy |
instance
|
static java.lang.String |
UNREACHABLE
|
| Method Summary | |
|---|---|
static IWriteResponseHandler |
applyCounterMutationOnCoordinator(CounterMutation cm,
java.lang.String localDataCenter)
|
static IWriteResponseHandler |
applyCounterMutationOnLeader(CounterMutation cm,
java.lang.String localDataCenter)
|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
describeSchemaVersions()
initiate a request/response session with each live node to check whether or not everybody is using the same migration id. |
boolean |
getHintedHandoffEnabled()
|
int |
getHintsInProgress()
|
int |
getMaxHintsInProgress()
|
int |
getMaxHintWindow()
|
long |
getRangeOperations()
|
static java.util.List<Row> |
getRangeSlice(RangeSliceCommand command,
ConsistencyLevel consistency_level)
|
long |
getReadOperations()
|
long[] |
getRecentRangeLatencyHistogramMicros()
|
double |
getRecentRangeLatencyMicros()
|
long[] |
getRecentReadLatencyHistogramMicros()
|
double |
getRecentReadLatencyMicros()
|
long[] |
getRecentWriteLatencyHistogramMicros()
|
double |
getRecentWriteLatencyMicros()
|
long |
getTotalHints()
|
long[] |
getTotalRangeLatencyHistogramMicros()
|
long |
getTotalRangeLatencyMicros()
|
long[] |
getTotalReadLatencyHistogramMicros()
|
long |
getTotalReadLatencyMicros()
|
long[] |
getTotalWriteLatencyHistogramMicros()
|
long |
getTotalWriteLatencyMicros()
|
long |
getWriteOperations()
|
static void |
mutate(java.util.List<? extends IMutation> mutations,
ConsistencyLevel consistency_level)
Use this method to have these Mutations applied across all replicas. |
static IWriteResponseHandler |
mutateCounter(CounterMutation cm,
java.lang.String localDataCenter)
Handle counter mutation on the coordinator host. |
static IWriteResponseHandler |
performWrite(IMutation mutation,
ConsistencyLevel consistency_level,
java.lang.String localDataCenter,
StorageProxy.WritePerformer performer)
Perform the write of a mutation given a WritePerformer. |
static java.util.List<Row> |
read(java.util.List<ReadCommand> commands,
ConsistencyLevel consistency_level)
Performs the actual reading of a row out of the StorageService, fetching a specific set of column names from a given column family. |
static java.util.List<Row> |
scan(java.lang.String keyspace,
java.lang.String column_family,
IndexClause index_clause,
SlicePredicate column_predicate,
ConsistencyLevel consistency_level)
|
static java.util.concurrent.Future<java.lang.Void> |
scheduleLocalHint(RowMutation mutation,
java.net.InetAddress target,
IWriteResponseHandler responseHandler,
ConsistencyLevel consistencyLevel)
|
static void |
sendToHintedEndpoints(RowMutation rm,
java.util.Collection<java.net.InetAddress> targets,
IWriteResponseHandler responseHandler,
java.lang.String localDataCenter,
ConsistencyLevel consistency_level)
Send the mutations to the right targets, write it locally if it corresponds or writes a hint when the node is not available. |
void |
setHintedHandoffEnabled(boolean b)
|
void |
setMaxHintsInProgress(int qs)
|
void |
setMaxHintWindow(int ms)
|
static boolean |
shouldHint(java.net.InetAddress ep)
|
static void |
truncateBlocking(java.lang.String keyspace,
java.lang.String cfname)
Performs the truncate operatoin, which effectively deletes all data from the column family cfname |
void |
verifyNoHintsInProgress()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String UNREACHABLE
public static final StorageProxy instance
| Method Detail |
|---|
public static void mutate(java.util.List<? extends IMutation> mutations,
ConsistencyLevel consistency_level)
throws UnavailableException,
java.util.concurrent.TimeoutException
mutations - the mutations to be applied across the replicasconsistency_level - the consistency level for the operation
UnavailableException
java.util.concurrent.TimeoutException
public static IWriteResponseHandler performWrite(IMutation mutation,
ConsistencyLevel consistency_level,
java.lang.String localDataCenter,
StorageProxy.WritePerformer performer)
throws UnavailableException,
java.util.concurrent.TimeoutException,
java.io.IOException
mutation - the mutation to be appliedconsistency_level - the consistency level for the write operationperformer - the WritePerformer in charge of appliying the mutation
given the list of write endpoints (either standardWritePerformer for
standard writes or counterWritePerformer for counter writes).
UnavailableException
java.util.concurrent.TimeoutException
java.io.IOException
public static void sendToHintedEndpoints(RowMutation rm,
java.util.Collection<java.net.InetAddress> targets,
IWriteResponseHandler responseHandler,
java.lang.String localDataCenter,
ConsistencyLevel consistency_level)
throws java.io.IOException,
java.util.concurrent.TimeoutException
java.util.concurrent.TimeoutException - if the hints cannot be written/enqueued
java.io.IOException
public static java.util.concurrent.Future<java.lang.Void> scheduleLocalHint(RowMutation mutation,
java.net.InetAddress target,
IWriteResponseHandler responseHandler,
ConsistencyLevel consistencyLevel)
throws java.io.IOException
java.io.IOException
public static IWriteResponseHandler mutateCounter(CounterMutation cm,
java.lang.String localDataCenter)
throws UnavailableException,
java.util.concurrent.TimeoutException,
java.io.IOException
UnavailableException
java.util.concurrent.TimeoutException
java.io.IOException
public static IWriteResponseHandler applyCounterMutationOnLeader(CounterMutation cm,
java.lang.String localDataCenter)
throws UnavailableException,
java.util.concurrent.TimeoutException,
java.io.IOException
UnavailableException
java.util.concurrent.TimeoutException
java.io.IOException
public static IWriteResponseHandler applyCounterMutationOnCoordinator(CounterMutation cm,
java.lang.String localDataCenter)
throws UnavailableException,
java.util.concurrent.TimeoutException,
java.io.IOException
UnavailableException
java.util.concurrent.TimeoutException
java.io.IOException
public static java.util.List<Row> read(java.util.List<ReadCommand> commands,
ConsistencyLevel consistency_level)
throws java.io.IOException,
UnavailableException,
java.util.concurrent.TimeoutException,
InvalidRequestException
java.io.IOException
UnavailableException
java.util.concurrent.TimeoutException
InvalidRequestException
public static java.util.List<Row> getRangeSlice(RangeSliceCommand command,
ConsistencyLevel consistency_level)
throws java.io.IOException,
UnavailableException,
java.util.concurrent.TimeoutException
java.io.IOException
UnavailableException
java.util.concurrent.TimeoutExceptionpublic static java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions()
public long getReadOperations()
getReadOperations in interface StorageProxyMBeanpublic long getTotalReadLatencyMicros()
getTotalReadLatencyMicros in interface StorageProxyMBeanpublic double getRecentReadLatencyMicros()
getRecentReadLatencyMicros in interface StorageProxyMBeanpublic long[] getTotalReadLatencyHistogramMicros()
getTotalReadLatencyHistogramMicros in interface StorageProxyMBeanpublic long[] getRecentReadLatencyHistogramMicros()
getRecentReadLatencyHistogramMicros in interface StorageProxyMBeanpublic long getRangeOperations()
getRangeOperations in interface StorageProxyMBeanpublic long getTotalRangeLatencyMicros()
getTotalRangeLatencyMicros in interface StorageProxyMBeanpublic double getRecentRangeLatencyMicros()
getRecentRangeLatencyMicros in interface StorageProxyMBeanpublic long[] getTotalRangeLatencyHistogramMicros()
getTotalRangeLatencyHistogramMicros in interface StorageProxyMBeanpublic long[] getRecentRangeLatencyHistogramMicros()
getRecentRangeLatencyHistogramMicros in interface StorageProxyMBeanpublic long getWriteOperations()
getWriteOperations in interface StorageProxyMBeanpublic long getTotalWriteLatencyMicros()
getTotalWriteLatencyMicros in interface StorageProxyMBeanpublic double getRecentWriteLatencyMicros()
getRecentWriteLatencyMicros in interface StorageProxyMBeanpublic long[] getTotalWriteLatencyHistogramMicros()
getTotalWriteLatencyHistogramMicros in interface StorageProxyMBeanpublic long[] getRecentWriteLatencyHistogramMicros()
getRecentWriteLatencyHistogramMicros in interface StorageProxyMBean
public static java.util.List<Row> scan(java.lang.String keyspace,
java.lang.String column_family,
IndexClause index_clause,
SlicePredicate column_predicate,
ConsistencyLevel consistency_level)
throws java.io.IOException,
java.util.concurrent.TimeoutException,
UnavailableException
java.io.IOException
java.util.concurrent.TimeoutException
UnavailableExceptionpublic boolean getHintedHandoffEnabled()
getHintedHandoffEnabled in interface StorageProxyMBeanpublic void setHintedHandoffEnabled(boolean b)
setHintedHandoffEnabled in interface StorageProxyMBeanpublic int getMaxHintWindow()
getMaxHintWindow in interface StorageProxyMBeanpublic void setMaxHintWindow(int ms)
setMaxHintWindow in interface StorageProxyMBeanpublic static boolean shouldHint(java.net.InetAddress ep)
public static void truncateBlocking(java.lang.String keyspace,
java.lang.String cfname)
throws UnavailableException,
java.util.concurrent.TimeoutException,
java.io.IOException
keyspace - cfname -
UnavailableException - If some of the hosts in the ring are down.
java.util.concurrent.TimeoutException
java.io.IOExceptionpublic long getTotalHints()
getTotalHints in interface StorageProxyMBeanpublic int getMaxHintsInProgress()
getMaxHintsInProgress in interface StorageProxyMBeanpublic void setMaxHintsInProgress(int qs)
setMaxHintsInProgress in interface StorageProxyMBeanpublic int getHintsInProgress()
getHintsInProgress in interface StorageProxyMBeanpublic void verifyNoHintsInProgress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||