Beispiel #1
0
  /**
   * @param cand Existing candidate.
   * @param newCand New candidate.
   * @return {@code False} if new candidate can not be added.
   */
  private boolean compareSerializableVersion(
      GridCacheMvccCandidate cand, GridCacheMvccCandidate newCand) {
    assert cand.serializable() && newCand.serializable();

    GridCacheVersion candOrder = cand.serializableOrder();

    assert candOrder != null : cand;

    GridCacheVersion newCandOrder = newCand.serializableOrder();

    assert newCandOrder != null : newCand;

    int cmp = SER_VER_COMPARATOR.compare(candOrder, newCandOrder);

    assert cmp != 0;

    return cmp < 0;
  }