Package er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer

Examples of er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer.RemoteChange


        try {
          byte[] buffer = message.getBuffer();
          ByteArrayInputStream bais = new ByteArrayInputStream(buffer);
          DataInputStream dis = new DataInputStream(bais);
          int transactionCount = dis.readInt();
          RemoteChange remoteChange = new RemoteChange("AnotherInstance", -1, transactionCount);
          for (int transactionNum = 0; transactionNum < transactionCount; transactionNum++) {
            _readCacheChange(remoteChange, dis);
          }
          addChange(remoteChange);
          if (ERXRemoteSynchronizer.log.isInfoEnabled()) {
            ERXRemoteSynchronizer.log.info("Received " + transactionCount + " changes from " + message.getSrc());
          }
          if (ERXRemoteSynchronizer.log.isDebugEnabled()) {
            ERXRemoteSynchronizer.log.info("  Changes = " + remoteChange.remoteCacheChanges());
          }
        }
        catch (IOException e) {
          ERXRemoteSynchronizer.log.error("Failed to apply remote changes.  This is bad.", e);
        }
View Full Code Here


              int transactionID = dis.readInt();
              short transactionNum = dis.readShort();
              short transactionSize = dis.readShort();
              String identifierHex = ERXStringUtilities.byteArrayToHexString(identifier);
              String transactionIdentifierStr = identifierHex + "-" + transactionID;
              RemoteChange remoteChange = _incomingCacheChanges.objectForKey(transactionIdentifierStr);
              if (remoteChange == null) {
                remoteChange = new RemoteChange(identifierHex, transactionID, transactionSize);
                _incomingCacheChanges.setObjectForKey(remoteChange, transactionIdentifierStr);
              }

              _readCacheChange(remoteChange, dis);

              if (remoteChange.isComplete()) {
                _incomingCacheChanges.removeObjectForKey(transactionIdentifierStr);
                addChange(remoteChange);
              }

              // TODO: Sweep the _cacheChanges dictionary for expired partial cache updates. If a
View Full Code Here

TOP

Related Classes of er.extensions.eof.ERXObjectStoreCoordinatorSynchronizer.RemoteChange

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.