public class GridCacheMetricsAdapter extends Object implements GridCacheMetrics, Externalizable
| Constructor and Description |
|---|
GridCacheMetricsAdapter()
No-args constructor.
|
GridCacheMetricsAdapter(boolean isDrSndCache,
boolean isDrRcvCache) |
GridCacheMetricsAdapter(GridCacheMetrics m) |
| Modifier and Type | Method and Description |
|---|---|
long |
commitTime()
Gets last time transaction was committed.
|
static GridCacheMetricsAdapter |
copyOf(GridCacheMetrics m)
Create a copy of given metrics object.
|
long |
createTime()
Gets create time of the owning entity (either cache or entry).
|
void |
delegate(GridCacheMetricsAdapter delegate) |
GridDrReceiverCacheMetrics |
drReceiveMetrics()
Gets metrics for data received during data center replication, if data center replication
is not configured then
IllegalStateException will be thrown. |
GridDrSenderCacheMetrics |
drSendMetrics()
Gets metrics for data sent during data center replication, if data center replication
is not configured then
IllegalStateException will be thrown. |
int |
hits()
Gets total number of hits for the owning entity (either cache or entry).
|
int |
misses()
Gets total number of misses for the owning entity (either cache or entry).
|
void |
onPauseStateChanged(GridDrPauseReason pauseReason,
String errMsg)
Callback for replication pause state changed.
|
void |
onRead(boolean isHit)
Cache read callback.
|
void |
onReceiveCacheConflictResolved(boolean usedNew,
boolean usedOld,
boolean usedMerge)
Callback for conflict resolver on receiver cache side.
|
void |
onReceiveCacheEntriesReceived(int entriesCnt)
Callback for received entries from receiver hub.
|
void |
onSenderCacheBatchAcknowledged(int entriesCnt)
Callback for received acknowledgement by sender hub.
|
void |
onSenderCacheBatchFailed(int entriesCnt)
Callback for received batch error by sender hub.
|
void |
onSenderCacheBatchSent(int entriesCnt)
Callback for sent batch on sender cache side.
|
void |
onSenderCacheEntryFiltered()
Callback for filtered entries on sender cache side.
|
void |
onTxCommit()
Transaction commit callback.
|
void |
onTxRollback()
Transaction rollback callback.
|
void |
onWrite()
Cache write callback.
|
void |
readExternal(ObjectInput in) |
int |
reads()
Gets total number of reads of the owning entity (either cache or entry).
|
long |
readTime()
Gets last read time of the owning entity (either cache or entry).
|
long |
rollbackTime()
Gets last time transaction was rollback.
|
String |
toString() |
int |
txCommits()
Gets total number of transaction commits.
|
int |
txRollbacks()
Gets total number of transaction rollbacks.
|
void |
writeExternal(ObjectOutput out) |
int |
writes()
Gets total number of writes of the owning entity (either cache or entry).
|
long |
writeTime()
Gets last write time of the owning entity (either cache or entry).
|
public GridCacheMetricsAdapter()
public GridCacheMetricsAdapter(boolean isDrSndCache,
boolean isDrRcvCache)
isDrSndCache - True if data center replication configured for sending on that node.isDrRcvCache - True if data center replication configured for receiving on that node.public GridCacheMetricsAdapter(GridCacheMetrics m)
m - Metrics to copy from.public void delegate(GridCacheMetricsAdapter delegate)
delegate - Metrics to delegate to.public long createTime()
createTime in interface GridCacheMetricspublic long writeTime()
writeTime in interface GridCacheMetricspublic long readTime()
readTime in interface GridCacheMetricspublic long commitTime()
commitTime in interface GridCacheMetricspublic long rollbackTime()
rollbackTime in interface GridCacheMetricspublic int reads()
reads in interface GridCacheMetricspublic int writes()
writes in interface GridCacheMetricspublic int hits()
hits in interface GridCacheMetricspublic int misses()
misses in interface GridCacheMetricspublic int txCommits()
txCommits in interface GridCacheMetricspublic int txRollbacks()
txRollbacks in interface GridCacheMetricspublic GridDrSenderCacheMetrics drSendMetrics()
IllegalStateException will be thrown.drSendMetrics in interface GridCacheMetricspublic GridDrReceiverCacheMetrics drReceiveMetrics()
IllegalStateException will be thrown.drReceiveMetrics in interface GridCacheMetricspublic void onRead(boolean isHit)
isHit - Hit or miss flag.public void onWrite()
public void onTxCommit()
public void onTxRollback()
public void onSenderCacheBatchAcknowledged(int entriesCnt)
entriesCnt - Number of entries in batch.public void onSenderCacheBatchFailed(int entriesCnt)
entriesCnt - Number of entries in batch.public void onSenderCacheBatchSent(int entriesCnt)
entriesCnt - Number of sent entries.public void onSenderCacheEntryFiltered()
public void onPauseStateChanged(@Nullable GridDrPauseReason pauseReason, @Nullable String errMsg)
pauseReason - Pause reason or null if replication is not paused.errMsg - Error message.public void onReceiveCacheConflictResolved(boolean usedNew,
boolean usedOld,
boolean usedMerge)
usedNew - New conflict status flag.usedOld - Old conflict status flag.usedMerge - Merge conflict status flag.public void onReceiveCacheEntriesReceived(int entriesCnt)
entriesCnt - Number of received entries.@Nullable public static GridCacheMetricsAdapter copyOf(@Nullable GridCacheMetrics m)
m - Metrics to copy from.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2014. All rights reserved.