コード例 #1
0
  /** Transaction rollback callback. */
  public void onTxRollback() {
    rollbackTime = U.currentTimeMillis();

    txRollbacks++;

    if (delegate != null) delegate.onTxRollback();
  }
コード例 #2
0
  /** Transaction commit callback. */
  public void onTxCommit() {
    commitTime = U.currentTimeMillis();

    txCommits++;

    if (delegate != null) delegate.onTxCommit();
  }
コード例 #3
0
  /** Cache write callback. */
  public void onWrite() {
    writeTime = U.currentTimeMillis();

    writes++;

    if (delegate != null) delegate.onWrite();
  }
コード例 #4
0
  /**
   * 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);
  }
コード例 #5
0
  /**
   * 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);
  }
コード例 #6
0
  /**
   * 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);
  }
コード例 #7
0
  /**
   * 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);
  }
コード例 #8
0
  /**
   * 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);
  }
コード例 #9
0
  /** Callback for filtered entries on sender cache side. */
  public void onSenderCacheEntryFiltered() {
    drSndMetrics.onEntryFiltered();

    if (delegate != null) delegate.onSenderCacheEntryFiltered();
  }
コード例 #10
0
  /**
   * 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);
  }
コード例 #11
0
  /**
   * 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);
  }