Package com.sun.appserv.util.cache

Examples of com.sun.appserv.util.cache.BaseCache


    private HashSet<ExpatListElement> getDFExpatIdsFromReplica(
            String requestingInstance) {
        //using set to avoid dups
        HashSet expatIds = new HashSet();
        //iterate over df replicas
        BaseCache replicatedDialogFragmentsCache = getReplicatedDialogFragments();
        Iterator it = replicatedDialogFragmentsCache.values();
        long version = -1L;
        while (it.hasNext()) {
            ReplicationState state = (ReplicationState) it.next();
            String dfId = (String) state.getId();
            //use beKey for mapping instance ownership
View Full Code Here


    /**
     * Get the DF' expat list from the replica cache for all the surviving instances.
     */
    private void getDFExpatIdsFromReplica(ExpatListQueryResults results) {
        //iterate over df replicas
        BaseCache replicatedDialogFragmentsCache = getReplicatedDialogFragments();
        Iterator it = replicatedDialogFragmentsCache.values();
        long version = -1L;
        while (it.hasNext()) {
            ReplicationState state = (ReplicationState) it.next();
            String dfId = (String) state.getId();
            //use bekey for mapping
View Full Code Here

        Collection<DialogFragmentExtraParams> dfResult =
                new LinkedList<DialogFragmentExtraParams>();
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("in " + this.getClass().getName() + ">>_findByCriteria_ExpiredDF");
        }
        BaseCache replicatedDialogFragmentsCache = getReplicatedDialogFragments();
        ReplicationHealthChecker healthChecker
                = ReplicationHealthChecker.getInstance();
        int expiredReplicas = 0;
        for (Iterator it = replicatedDialogFragmentsCache.keys(); it.hasNext();) {
            ReplicationState nextState = (ReplicationState)
                    replicatedDialogFragmentsCache.get((String) it.next());
            if (!ExpatListHandler.isExpatExtraDurationInEffect()
                    && !ExpatListHandler.isExpatInProgress()
                    && isExpiredDialogFragmentReplica(nextState)) {
                expiredReplicas++;
                dfResult.add(getDialogFragmentExtraParamsFrom(nextState));
View Full Code Here

            = healthChecker.getReshapeReplicateFromInstanceName();
        if(replicatedFromInstanceName != null && replicatedFromInstanceName.equalsIgnoreCase(owningInstanceName)) {           
            return;          
        }       
        List idsToRemove = new ArrayList();
        BaseCache replicatedDialogFragmentsCache = getReplicatedDialogFragments();
        Iterator it = replicatedDialogFragmentsCache.values();
        /* todo remove after testing
        Iterator it = replicatedDialogFragments.values();
        */
        while(it.hasNext()) {
            ReplicationState nextState
View Full Code Here

            throws IOException, BackingStoreException, RemoteLockException {
        /**
         * For the in-memory implementation, the restarted instance might
         * have the session in its replica cache, if the load-factor is used.
         */
        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("SipApplicationSessionStoreImpl>>loadFromActiveCache:id="
View Full Code Here

            throws IOException, BackingStoreException, RemoteLockException {
        /**
         * For the in-memory implementation, the restarted instance might
         * have the session in its replica cache, if the load-factor is used.
         */
        BaseCache replicaCache = getReplicaCache();
        if(replicaCache != null) {
            replicaCache.remove(id);
        }
        ReplicationState sessionState = loadTimerFromRemoteActiveCache(
                id, String.valueOf(expat.getVersion()), expat.getInstanceName());
        if (_logger.isLoggable(Level.FINE)) {
            _logger.fine("ServletTimerStoreImpl>>loadFromActiveCache:id="
View Full Code Here

    List<ReplicationState> getSipSessionReplicas(String owningInstanceName) {
        List<ReplicationState> sessionIds = new ArrayList();
        //using set to avoid dups
        HashSet sessionIdsSet = new HashSet();
        //iterate over sip session replicas
        BaseCache replicatedSipSessionsCache = getReplicatedSipSessions();
        Iterator it = replicatedSipSessionsCache.values();
        while(it.hasNext()) {
            ReplicationState nextState
                = (ReplicationState)it.next();
            RollingUpgradeUtil.filterOwnershipOfReplicas(owningInstanceName, nextState, sessionIdsSet);
        }
View Full Code Here

    List<ReplicationState> getServletTimerReplicas(String owningInstanceName) {
        List<ReplicationState> sessionIds = new ArrayList();
        //using set to avoid dups
        HashSet timerIdsSet = new HashSet();
        //iterate over servlet timer replicas
        BaseCache replicatedServletTimersCache = getReplicatedServletTimers();
        Iterator it = replicatedServletTimersCache.values();
        while(it.hasNext()) {
            ReplicationState nextState
                = (ReplicationState)it.next();
            RollingUpgradeUtil.filterOwnershipOfReplicas(owningInstanceName, nextState, timerIdsSet);
        }
View Full Code Here

            throws IOException, BackingStoreException, RemoteLockException {
        /**
         * For the in-memory implementation, the restarted instance might
         * have the session in its replica cache, if the load-factor is used.
         */
        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="
View Full Code Here

     */
    HashSet<ExpatListElement> getSipSessionExpatIdsFromReplica(String requestingInstance) {
        //using set to avoid dups
        HashSet expatIds = new HashSet();
        //iterate over sip session replicas
        BaseCache replicatedSipSessionsCache = getReplicatedSipSessions();
        Iterator it = replicatedSipSessionsCache.values();
        long version = -1L;
        while (it.hasNext()) {
            ReplicationState state = (ReplicationState) it.next();
            String ssId = (String) state.getId();
            //use bekey for mapping instance ownership
View Full Code Here

TOP

Related Classes of com.sun.appserv.util.cache.BaseCache

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.