/** Transaction rollback callback. */ public void onTxRollback() { rollbackTime = U.currentTimeMillis(); txRollbacks++; if (delegate != null) delegate.onTxRollback(); }
/** Transaction commit callback. */ public void onTxCommit() { commitTime = U.currentTimeMillis(); txCommits++; if (delegate != null) delegate.onTxCommit(); }
/** Cache write callback. */ public void onWrite() { writeTime = U.currentTimeMillis(); writes++; if (delegate != null) delegate.onWrite(); }
/** * Cache read callback. * * @param isHit Hit or miss flag. */ public void onRead(boolean isHit) { readTime = U.currentTimeMillis(); reads++; if (isHit) hits++; else misses++; if (delegate != null) delegate.onRead(isHit); }
/** * Callback for received entries from receiver hub. * * @param entriesCnt Number of received entries. */ public void onReceiveCacheEntriesReceived(int entriesCnt) { if (drRcvMetrics != null) drRcvMetrics.onReceiveCacheEntriesReceived(entriesCnt); if (delegate != null) delegate.onReceiveCacheEntriesReceived(entriesCnt); }
/** * Callback for conflict resolver on receiver cache side. * * @param usedNew New conflict status flag. * @param usedOld Old conflict status flag. * @param usedMerge Merge conflict status flag. */ public void onReceiveCacheConflictResolved(boolean usedNew, boolean usedOld, boolean usedMerge) { drRcvMetrics.onReceiveCacheConflictResolved(usedNew, usedOld, usedMerge); if (delegate != null) delegate.onReceiveCacheConflictResolved(usedNew, usedOld, usedMerge); }
/** * Callback for replication pause state changed. * * @param pauseReason Pause reason or {@code null} if replication is not paused. */ public void onPauseStateChanged(@Nullable GridDrPauseReason pauseReason) { drSndMetrics.onPauseStateChanged(pauseReason); if (delegate != null) delegate.onPauseStateChanged(pauseReason); }
/** * Callback for backup queue size changed. * * @param newSize New size of sender cache backup queue. */ public void onSenderCacheBackupQueueSizeChanged(int newSize) { drSndMetrics.onBackupQueueSizeChanged(newSize); if (delegate != null) delegate.onSenderCacheBackupQueueSizeChanged(newSize); }
/** Callback for filtered entries on sender cache side. */ public void onSenderCacheEntryFiltered() { drSndMetrics.onEntryFiltered(); if (delegate != null) delegate.onSenderCacheEntryFiltered(); }
/** * Callback for sent batch on sender cache side. * * @param entriesCnt Number of sent entries. */ public void onSenderCacheBatchSent(int entriesCnt) { drSndMetrics.onBatchSent(entriesCnt); if (delegate != null) delegate.onSenderCacheBatchSent(entriesCnt); }
/** * Callback for received acknowledgement by sender hub. * * @param entriesCnt Number of entries in batch. */ public void onSenderCacheBatchAcknowledged(int entriesCnt) { drSndMetrics.onBatchAcked(entriesCnt); if (delegate != null) delegate.onSenderCacheBatchAcknowledged(entriesCnt); }