Package com.sun.appserv.ha.spi

Examples of com.sun.appserv.ha.spi.BackingStore


            ((BaseHASession)session).setUserName(userName);
        }
        byte[] sessionState = this.getByteArray(session, isReplicationCompressionEnabled());
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>doValveSave replicator: " + replicator);
            _logger.fine("ReplicationStore>>doValveSave version:" + session.getVersion());                      
        }       
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(session.getVersion()//version
                ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                session.getMaxInactiveInterval(), //maxinactiveinterval
                sessionState, //state
                ((HASession)session).getExtraParameters()); //containerExtraParam
        String beKey = session.getBeKey();
        if(beKey != null) {
            simpleMetadata.setBeKey(beKey);
        }
        try {
            HASession haSess = (HASession)session;
            replicator.save(session.getIdInternal(), //id
                    simpleMetadata, haSess.isPersistent())//TODO: Revist the last param
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during save: " + ex.getMessage()).initCause(ex);
            throw ex1;
View Full Code Here


    }

    public ReplicationState getTransmitState(Session session) throws IOException {
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
View Full Code Here

     */   
    public void doSave(Session session) throws IOException {
        byte[] sessionState = this.getByteArray(session, isReplicationCompressionEnabled());
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>save: replicator: " + replicator);                      
        }        
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(session.getVersion()//version
                ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                session.getMaxInactiveInterval(), //maxinactiveinterval
                sessionState, //state
                ((HASession)session).getExtraParameters()); //containerExtraParams
        String beKey = session.getBeKey();
        if(beKey != null) {
            simpleMetadata.setBeKey(beKey);
        }       
        try {       
            replicator.save(session.getIdInternal(), //id
                    simpleMetadata, !((HASession) session).isPersistent())//TODO: Revist the last param
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during save: " + ex.getMessage()).initCause(ex);
            throw ex1;
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>doRemove");                      
        }       
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>doRemove: replicator: " + replicator);                      
        }       
        try {
            replicator.remove(id);
        } catch (BackingStoreException ex) {
            //FIXME
        }
    }    
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>removeSynchronized");                      
        }        
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>removeSynchronized: replicator: " + replicator);                      
        }       
        try {
            replicator.remove(id);
        } catch (BackingStoreException ex) {
            //FIXME
        }
    }
View Full Code Here

        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        if(mgr == null) {
            return result;
        }
        BackingStore replicator = mgr.getBackingStore();
        try {
            result = replicator.removeExpired();
        } catch (BackingStoreException ex) {
            //FIXME
        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>removeExpiredSessions():number of expired sessions = " + result);
View Full Code Here

    }

    BackingStore getBackingStore() {
        ReplicationManagerBase mgr
                = (ReplicationManagerBase) this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        return replicator;
    }
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>findSessionViaBroadcast");                      
        }       
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        JxtaBackingStoreImpl jxtaReplicator = null;
        if(replicator instanceof JxtaBackingStoreImpl) {
            jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        }
        if(_logger.isLoggable(Level.FINE)) {
View Full Code Here

     */   
    public void updateLastAccessTime(Session session) throws IOException {
       
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>updateLastAccessTime: replicator: " + replicator);                      
        }        
        try {
            /* FIXED
            replicator.updateLastAccessTime(session.getIdInternal(), //id
                    ((BaseHASession)session).getLastAccessedTimeInternal(), //lastaccesstime
                    session.getVersion()); //version
            */
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(session.getVersion(),
                    ((BaseHASession)session).getLastAccessedTimeInternal());
            replicator.save(session.getIdInternal(), smd, !((HASession) session).isPersistent()); //version
        } catch (BackingStoreException ex) {
            //FIXME
        }
    }       
View Full Code Here

   
    public int getSize() throws IOException {
        int result = 0;
        ReplicationManagerBase mgr
            = (ReplicationManagerBase)this.getManager();
        BackingStore replicator = mgr.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicationStore>>getSize: replicator: " + replicator);                      
        }        
        try {
            result = replicator.size();
        } catch (BackingStoreException ex) {
            //nothing to do - ok to eat exception
        }
        return result;
    }   
View Full Code Here

TOP

Related Classes of com.sun.appserv.ha.spi.BackingStore

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.