Package com.sun.appserv.ha.spi

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


    public int removeExpiredSessions() {       
        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("IN SipSessionStoreImpl>>removeExpiredSessions");
        }
        int result = 0;
        BackingStore replicator = getBackingStore();
        try {
            result = replicator.removeExpired();
        } catch (BackingStoreException ex) {
            _logger.log(Level.WARNING,
                "unable to remove expired sip session replicas", ex);
        }
        if(_logger.isLoggable(Level.FINE)) {
View Full Code Here


            env.put(SUPPRESS_LOAD_ACK_PROPERTY, Boolean.TRUE);
        }
        //does this manager & backing store support replication compression
        env.put(REPLICATION_COMPRESSION_PROPERTY, Boolean.valueOf(this.isReplicationCompressionEnabled()));
        env.put(SESSION_MANAGER_PROPERTY, this);
        BackingStore backingStore = null;
        try {
            backingStore = storeFactory.createBackingStore(
                        this.getApplicationId(), //appid
                        String.class,
                        SimpleMetadata.class,     //type
View Full Code Here

        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("in " + this.getClass().getName() + ">>processExpiredSipApplicationSessionReplicasThirdPartySPI");
        }
        Map<String, HashSet<String>> expiredReplicaMap =
                new HashMap<String, HashSet<String>>();
        BackingStore sipApplicationSessionBackingStore
                = this.getSipApplicationSessionBackingStore();
        String applicationId = this.getApplicationId();
        SipApplicationSessionExtraParams sasExtraParamCriteria
                = SipApplicationSessionExtraParams.createSearchCriteriaAppid(this, applicationId);
        Collection<SipApplicationSessionExtraParams> expiredReplicas
                = (Collection<SipApplicationSessionExtraParams>)
                sipApplicationSessionBackingStore.findByCriteria(null, sasExtraParamCriteria); //TODO: pass criteria

        for (SipApplicationSessionExtraParams nextExtraParam : expiredReplicas) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.fine("in " + this.getClass().getName() + " nextExtraParam=" + nextExtraParam);
            }
View Full Code Here

    public void _processExpiredSipSessions() {
          if (_logger.isLoggable(Level.FINE)) {
              _logger.fine("in " + this.getClass().getName() + ">>_process_ExpiredSipSessions");
          }

          BackingStore sipSessionBackingStore
                  = this.getSipSessionBackingStore();
          String applicationId = this.getApplicationId();
          SipSessionExtraParams sipSessionExtraParamCriteria
                  = SipSessionExtraParams.createSearchCriteriaAppid(
                  this, applicationId);
          Collection<SipSessionExtraParams> sipSessionColl
                  = sipSessionBackingStore.findByCriteria(null, sipSessionExtraParamCriteria);

          for (SipSessionExtraParams nextExtraParam : sipSessionColl) {
              if (_logger.isLoggable(Level.FINE)) {
                  _logger.fine("in " + this.getClass().getName() + " nextExtraParam=" + nextExtraParam);
              }
View Full Code Here

        return result;
    }         
   
    List getSipSessionExtraParamsThirdPartySPI() {       
        BackingStore sipSessionBackingStore
            = this.getSipSessionBackingStore();
        String applicationId = this.getApplicationId();
        SipSessionExtraParams sipSessionExtraParamCriteria
            = SipSessionExtraParams.createSearchCriteriaAppid(this, applicationId);
        Collection<SipSessionExtraParams> sipSessionColl
            = sipSessionBackingStore.findByCriteria(null, sipSessionExtraParamCriteria);

        List result = new ArrayList();       
        Iterator<SipSessionExtraParams> sipSessionResults =
            (Iterator<SipSessionExtraParams>) sipSessionColl.iterator();
        while (sipSessionResults.hasNext()) {
View Full Code Here

        //code assumes that isExpired works for this type of ReplicationState
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("in " + this.getClass().getName() + ">>processExpiredServletTimerReplicasThirdPartySPI");
        }

        BackingStore servletTimerBackingStore
                = this.getServletTimerBackingStore();
        String applicationId = this.getApplicationId();
        ServletTimerExtraParams servletTimerExtraParamCriteria
                = ServletTimerExtraParams.createSearchCriteriaAppid(this, applicationId);
        Collection<ServletTimerExtraParams> servletTimerColl
                = servletTimerBackingStore.findByCriteria(
                null, servletTimerExtraParamCriteria);

        int count = 0;
        for (ServletTimerExtraParams nextExtraParam : servletTimerColl) {
            if (_logger.isLoggable(Level.FINE)) {
View Full Code Here

        }
         */       
    }
   
    void respondToFailureThirdPartySPI(String failedInstanceName) {
        BackingStore servletTimerBackingStore = this.getServletTimerBackingStore();
        ServletTimerExtraParams timerExtraParamCriteria
            = ServletTimerExtraParams.createSearchCriteria(
                    this, getApplicationId(), failedInstanceName);
        Collection<ServletTimerExtraParams> timerColl
            = servletTimerBackingStore.findByCriteria(null, timerExtraParamCriteria);
       
        Iterator<ServletTimerExtraParams> timerResults =
            (Iterator<ServletTimerExtraParams>) timerColl.iterator();
        while (timerResults.hasNext()) {
            ServletTimerExtraParams eParam = timerResults.next();
            if (failedInstanceName.equals(eParam.getCurrentOwnerInstanceName())) {
                activationHelper.registerServletTimerMigrationTask(eParam);
            }           
        }
       
        BackingStore sipApplicationSessionBackingStore
            = this.getSipApplicationSessionBackingStore();
        SipApplicationSessionExtraParams sasExtraParamCriteria
            = SipApplicationSessionExtraParams.createSearchCriteria(
                    this, getApplicationId(), failedInstanceName);
        Collection<SipApplicationSessionExtraParams> sasColl
            = sipApplicationSessionBackingStore.findByCriteria(null, sasExtraParamCriteria);
       
        Iterator<SipApplicationSessionExtraParams> sasResults =
            (Iterator<SipApplicationSessionExtraParams>) sasColl.iterator();
        while (sasResults.hasNext()) {
            SipApplicationSessionExtraParams eParam = sasResults.next();
View Full Code Here

            }           
        }        
    }
   
    boolean isThirdPartyBackingStoreInUse() {
        BackingStore sasBackingStore
            = getSipApplicationSessionBackingStore();
        return (!(sasBackingStore instanceof JxtaBackingStoreImpl));
    }
View Full Code Here

        sessionIds.addAll(sessionIdsSet);
        return sessionIds;
    }

    List<FederatedQueryListElement> getSipApplicationSessionIdsThirdPartySPI(String owningInstanceName) {
        BackingStore backingStore
                = this.getSipApplicationSessionBackingStore();
        SipApplicationSessionExtraParams sasExtraParamCriteria
                = SipApplicationSessionExtraParams.createSearchCriteria(
                this, this.getApplicationId(), owningInstanceName);
        Collection<SipApplicationSessionExtraParams> sasColl
                = backingStore.findByCriteria(null, sasExtraParamCriteria);

        List<FederatedQueryListElement> sessionIds = new ArrayList();
        //using set to avoid dups
        HashSet sessionIdsSet = new HashSet();
        Iterator<SipApplicationSessionExtraParams> sasResults =
View Full Code Here

            return ReplicationState.createQueryResponseFrom(queryState, resultState);
        }
    } 
   
    List<FederatedQueryListElement> getSipSessionIdsThirdPartySPI(String owningInstanceName) {
        BackingStore backingStore
            = this.getSipSessionBackingStore();
        SipSessionExtraParams ssExtraParamCriteria
            = SipSessionExtraParams.createSearchCriteria(this, owningInstanceName);
        Collection<SipSessionExtraParams> ssColl
            = backingStore.findByCriteria(null, ssExtraParamCriteria);

        List<FederatedQueryListElement> sessionIds = new ArrayList();
        //using set to avoid dups
        HashSet sessionIdsSet = new HashSet();
        Iterator<SipSessionExtraParams> ssResults =
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.