Package com.tangosol.util

Examples of com.tangosol.util.UID


    public void memberJoined(MemberEvent memberEvent) {
        if (memberEvent.isLocal()) {
            done = false;
            // We left and re-joined the cluster
            Log.info("Rejoining cluster as node: " + new UID(CacheFactory.getClusterMemberID()) + ". Senior Member: " +
                    (CacheFactory.isSeniorClusterMember() ? "YES" : "NO"));
            // Simulate insert events of existing cache content
            simuateCacheInserts(C2SCache);
            simuateCacheInserts(anonymousC2SCache);
            simuateCacheInserts(S2SCache);
View Full Code Here


   * None of changes will be visible until you call {@link #commit()}.
   */
  public void put(Object key, Object value) {
    dirty = true;
    Member member = ((PartitionedService)cache.getCacheService()).getKeyOwner(key);
    UID id = member.getUid();
    Map<Object, Object> buf = nodeBuffer.get(id);
    if (buf == null) {
      buf = new HashMap<Object, Object>();
      nodeBuffer.put(id, buf);
    }
View Full Code Here

  }
 
  public synchronized void addReadLock(int version) {
    Integer lockCount = versionLocks.get(version);
    if (lockCount == null) {
      UID uid = txControl.getCacheService().getCluster().getLocalMember().getUid();
      txControl.put(new ReaderLock(uid, version), null);
      versionLocks.put(version, 1);
    }
    else {
      versionLocks.put(version, lockCount + 1);
View Full Code Here

    if (lockCount == null) {
      throw new IllegalStateException("Try to release lock, but lock lock for version " + version + " is established");
    }
    lockCount = lockCount - 1;
    if (lockCount == 0) {
      UID uid = txControl.getCacheService().getCluster().getLocalMember().getUid();
      txControl.remove(new ReaderLock(uid, version));
      versionLocks.remove(version);
    }
  }
View Full Code Here

TOP

Related Classes of com.tangosol.util.UID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.