Examples of ReplicationState


Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

        sendLoadAcknowledgement(loadReceivedState, beKey);
    }

    protected void sendLoadAcknowledgement(String id, String command,
                                           long version, String beKey) {
        ReplicationState loadReceivedState =
            ReplicationState.createBroadcastLoadReceivedState(
                MODE_SIP, id,
                getApplicationId(), version,
                ReplicationUtil.getInstanceName(), command);
        sendLoadAcknowledgement(loadReceivedState, beKey);
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

         */
        BaseCache replicaCache = getReplicaCache();
        if(replicaCache != null) {
            replicaCache.remove(id);
        }
        ReplicationState sessionState = loadSessionFromRemoteActiveCache(
                id, String.valueOf(expat.getVersion()), expat.getInstanceName());
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>loadFromActiveCache:id="
                    + id + ", sessionState=" + sessionState);
        }
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

        if(id == null) {
            return result;
        }
        SipTransactionPersistentManager repMgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
        ReplicationState localCachedState
            = repMgr.removeFromSipSessionReplicationCache(id);
        //check if we got a hit from our own replica cache
        //and check if we can trust it. If so save and return it immediately
        boolean trustCachedState = canTrustLocallyCachedState(id, version, localCachedState);
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>__load:id= " + id + ", localCachedState=" +
                    localCachedState + ", trustCachedState=" + trustCachedState);
        }
        ReplicationState bestState = null;
        if(trustCachedState) {
            bestState = localCachedState;
        } else {
            ReplicationState broadcastResultState =
                    findSessionViaBroadcastOrUnicast(id, version);
            bestState = ReplicationState.getBestResult(localCachedState, broadcastResultState);
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("SipSessionStoreImpl>>__load:id=" + id + ", broadcastResultState " +
                        "from broadcast or unicast=" + broadcastResultState + ", bestState = " + bestState);
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>findSessionViaBroadcast: replicator: " + replicator);                      
        }
       
        ReplicationState queryResult = jxtaReplicator != null ?
                jxtaReplicator.__load(id, version) : null;
        return queryResult;
    }
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

    private ReplicationState loadSessionFromRemoteActiveCache(String id,
                                                              String version,
                                                              String instanceName)
            throws BackingStoreException {
        ReplicationState returnState = findSessionViaUnicast(id, version, instanceName);
        if (returnState != null && returnState.getState() != null) {
            __addToRemotelyLoadedSessionIds(id);
            removeExpatListElementFor(id);
        }
        return returnState;
    }
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

        BackingStore replicator = mgr.getSipSessionBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
        byte[] sessionState = ReplicationUtil.getByteArray(haSession, isReplicationCompressionEnabled());

        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haSession.getVersion(),
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

        throws IOException {   
        //send load received ack to instanceName
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)getSipSessionManager();
        String theCommand = mgr.MESSAGE_BROADCAST_LOAD_RECEIVED_SIP_SESSION;
        ReplicationState loadReceivedState =
            ReplicationState.createBroadcastLoadReceivedState(MODE_SIP, id, this.getApplicationId(), 0L, mgr.getInstanceName(), theCommand);             
        JxtaReplicationSender sender
            = JxtaReplicationSender.createInstance();
        sender.sendOverPropagatedPipe(loadReceivedState, instanceName, false);
        //if we want to batch unicast load acks use next line
View Full Code Here

Examples of com.sun.enterprise.ee.web.sessmgmt.ReplicationState

    ReplicationState sendUnicastLoadQuery(String id, String version, String instanceName) {
        //send load query to instanceName via unicast
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)getSipSessionManager();
        String theCommand = mgr.LOAD_SIP_SESSION_COMMAND;
        ReplicationState loadState
            = ReplicationState.createUnicastLoadState(MODE_SIP, id, this.getApplicationId(), ReplicationUtil.parseLong(version), mgr.getInstanceName(), theCommand);
        JxtaReplicationSender sender
            = JxtaReplicationSender.createInstance();
        ReplicationState returnState
            = sender.sendReplicationLoadState(loadState, instanceName, useReplicationUnicastLoadBatching);
        return returnState;
    }
View Full Code Here

Examples of org.openstreetmap.osmosis.replication.common.ReplicationState

    server = new ReplicationSequenceServer(0);
    server.setChangeSink(new MockReplicationDestination());

    try {
      for (int i = 0; i < 10; i++) {
        ReplicationState state = new ReplicationState();
        Map<String, Object> metaData = new HashMap<String, Object>();
        metaData.put(ReplicationState.META_DATA_KEY, state);
        server.initialize(metaData);
        Thread.sleep(10);
        server.complete();
View Full Code Here

Examples of org.openstreetmap.osmosis.replication.common.ReplicationState

  }


  private ReplicationState getReplicationState(long sequenceNumber) {
    PropertiesPersister persister = new PropertiesPersister(getStateFile(sequenceNumber));
    ReplicationState state = new ReplicationState();
    state.load(persister.loadMap());

    return state;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.