Exemple #1
0
  /**
   * @param ver Version to check for ownership.
   * @return {@code True} if lock is owned by the specified version.
   */
  boolean isOwnedBy(GridCacheVersion ver) {
    CacheLockCandidates owners = allOwners();

    return owners != null && owners.hasCandidate(ver);
  }
Exemple #2
0
  /**
   * @param lockVer ID of lock candidate.
   * @return {@code True} if candidate is owner.
   */
  boolean isLocallyOwned(GridCacheVersion lockVer) {
    CacheLockCandidates owners = localOwners();

    return owners != null && owners.hasCandidate(lockVer);
  }