Package com.sun.appserv.ha.spi

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


     * @exception IOException
     */
    public void doSave(HAServletTimer haTimer) throws IOException {
        haTimer.setInternalLastAccessedTime(System.currentTimeMillis());
        byte[] timerState = ReplicationUtil.getByteArray(haTimer, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =
            SimpleMetadataFactory.createSimpleMetadata(
                haTimer.getVersion(),
                haTimer.getInternalLastAccessedTime(), //lastAccessedTime
                0L, //maxinactiveinterval
                timerState,
                haTimer.getExtraParameters() //containerExtraParam
            );
        if(haTimer.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haTimer.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }

        try {
            replicator.save(haTimer.getId(), //id
                    simpleMetadata, haTimer.isReplicated());
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during save: " + ex.getMessage()).initCause(ex);
            throw ex1;
View Full Code Here


    }

    public ReplicationState getTransmitState(HAServletTimer haTimer) throws IOException {
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
        BackingStore replicator = mgr.getServletTimerBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
View Full Code Here

     */
    public void remove(String id) throws IOException {
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>remove" + " id: " + id);
        }
        BackingStore replicator = this.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>remove: replicator: " + replicator);
        }
        try {
            replicator.remove(id);
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during remove: " + ex.getMessage()).initCause(ex);
            throw ex1;
        }
View Full Code Here

     */
    public void remove(String id, String originatingInstanceName, int count) throws IOException {
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>remove" + " id: " + id + " originatingInstanceName: " + originatingInstanceName);
        }
        BackingStore replicator = this.getBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return;
        }
        JxtaBackingStoreImpl jxtaReplicator
            = (JxtaBackingStoreImpl)replicator;
View Full Code Here

     * @param timer ServletTimerImpl to be saved
     *
     * @exception IOException if an input/output error occurs
     */
    public void updateContainerExtraParam(HAServletTimer timer) throws IOException {
        BackingStore replicator = this.getBackingStore();
        JxtaBackingStoreImpl jxtaReplicator = null;
        if(replicator instanceof JxtaBackingStoreImpl) {
            jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>updateContainerExtraParam: replicator: " + replicator);
        }
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(0L, //lastaccesstime not used for ServletTimer
                    timer.getVersion(), //version
                    timer.getExtraParameters());
            replicator.save(timer.getId(), smd, timer.isReplicated()); //containerExtraParams
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during updateContainerExtraParam: " + ex.getMessage()).initCause(ex);
            throw ex1;
        }
View Full Code Here

    private ReplicationState findSessionViaBroadcast(String id, String version)
        throws BackingStoreException {
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>findSessionViaBroadcast");                      
        }       
        BackingStore replicator = this.getBackingStore();
        JxtaBackingStoreImpl jxtaReplicator = null;
        if(replicator instanceof JxtaBackingStoreImpl) {
            jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        }
        if(_logger.isLoggable(Level.FINE)) {
View Full Code Here

     *
     * @exception IOException
     */
    public void doSave(HASipSession haSession) throws IOException {
        byte[] sessionState = ReplicationUtil.getByteArray(haSession, isReplicationCompressionEnabled());
        BackingStore replicator = this.getBackingStore();
        SimpleMetadata simpleMetadata =       
            SimpleMetadataFactory.createSimpleMetadata(
                haSession.getVersion(),
                haSession.getInternalLastAccessedTime(),
                0L, //maxinactiveinterval
                sessionState,
                haSession.getExtraParameters() //containerExtraParam
            );      
        if(haSession.getParentSASId() != null) {
            String beKey = SipApplicationSessionUtil.getSipApplicationKey(haSession.getParentSASId());
            simpleMetadata.setBeKey(beKey);
            simpleMetadata.setOwningInstanceName(ReplicationUtil.getInstanceName());
        }
               
        try {       
            replicator.save(haSession.getId(), //id
                    simpleMetadata, haSession.isReplicated());
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during save: " + ex.getMessage()).initCause(ex);
            throw ex1;
View Full Code Here

    }

    public ReplicationState getTransmitState(HASipSession haSession) throws IOException {
        SipTransactionPersistentManager mgr
            = (SipTransactionPersistentManager)this.getSipSessionManager();
        BackingStore replicator = mgr.getSipSessionBackingStore();
        if(!(replicator instanceof JxtaBackingStoreImpl)) {
            return null;
        }
        JxtaBackingStoreImpl jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        ReplicationState transmitState = null;
View Full Code Here

     */
    public void remove(String id) throws IOException {
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>remove" + " id: " + id);                      
        }
        BackingStore replicator = this.getBackingStore();
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>remove: replicator: " + replicator);                      
        }       
        try {
            replicator.remove(id);
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during remove: " + ex.getMessage()).initCause(ex);
            throw ex1;      
        }
View Full Code Here

     *
     * @exception IOException if an input/output error occurs
     */   
    public void updateContainerExtraParam(HASipSession sipSession)
            throws IOException {
        BackingStore replicator = this.getBackingStore();
        JxtaBackingStoreImpl jxtaReplicator = null;
        if(replicator instanceof JxtaBackingStoreImpl) {
            jxtaReplicator = (JxtaBackingStoreImpl)replicator;
        }
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("SipSessionStoreImpl>>updateContainerExtraParam: replicator: " + replicator);                      
        }        
        try {
            SimpleMetadata smd = SimpleMetadataFactory.createSimpleMetadata(
                    sipSession.getInternalLastAccessedTime(), //internallastaccesstime
                    sipSession.getVersion(), //version
                    sipSession.getExtraParameters());
            replicator.save(sipSession.getId(), smd, sipSession.isReplicated()); //containerExtraParams
        } catch (BackingStoreException ex) {
            IOException ex1 =
                (IOException) new IOException("Error during updateContainerExtraParam: " + ex.getMessage()).initCause(ex);
            throw ex1;
        }
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.