Package com.sun.appserv.util.cache

Examples of com.sun.appserv.util.cache.BaseCache.values()


    public ReplicationState[] getReplicatedSsoEntriesArray() {
        BaseCache replicatedSSOEntriesCache = getReplicatedSSOEntries();
        ReplicationState[] ssoEntries = null;
        int numberOfIds = replicatedSSOEntriesCache.getEntryCount();
        ArrayList valuesList = new ArrayList(numberOfIds);
        Iterator valuesIter = replicatedSSOEntriesCache.values();
        while(valuesIter.hasNext()) {
            valuesList.add((ReplicationState)valuesIter.next());
        }
        ReplicationState[] template = new ReplicationState[valuesList.size()];
        ssoEntries = (ReplicationState[])valuesList.toArray(template);
View Full Code Here


            String requestingInstance) {
        //using set to avoid dups
        HashSet expatIdsSet = new HashSet();
        //iterate over session replicas
        BaseCache replicatedSessionsCache = getReplicatedSessions();
        Iterator it = replicatedSessionsCache.values();
        long version = -1L;
        while (it.hasNext()) {
            ReplicationState state = (ReplicationState) it.next();
            String sId = (String) state.getId();
            //use bekey for mapping instance ownership
View Full Code Here

     * Get the HttpSession' expat list from the replica cache for all the surviving instances.
     */
    private void getHttpSessionExpatIdsFromReplica(ExpatListQueryResults results) {
        //iterate over session replicas
        BaseCache replicatedSessionsCache = getReplicatedSessions();
        Iterator it = replicatedSessionsCache.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

        if(replicatedFromInstanceName != null && replicatedFromInstanceName.equalsIgnoreCase(owningInstanceName)) {           
            return;          
        }       
        List idsToRemove = new ArrayList();
        BaseCache replicatedSessionsCache = getReplicatedSessions();
        Iterator it = replicatedSessionsCache.values();
        while(it.hasNext()) {
            ReplicationState nextState
                = (ReplicationState)it.next();
            byte[] extraParamsState
                = nextState.getContainerExtraParamsState();
View Full Code Here

    public static int removeStaleReplicas(String reconcilingInstance,
                                           SessionStoreInterface storeInterface) {
        Set<String> replicasToBePurged = new HashSet<String>();
        BaseCache replicaCache = storeInterface.getReplicaCache();
        Iterator<ReplicationState> replicatedSessions = replicaCache.values();
        List lbEnabledList = getLbEnabledList();
        while (replicatedSessions.hasNext()) {
            ReplicationState replica = replicatedSessions.next();
            if (canRemoveReplica(replica, reconcilingInstance, lbEnabledList)) {
                replicasToBePurged.add((String) replica.getId());
View Full Code Here

            }
            // If some other instance has failed during the rolling upgrade of an instance,
            // then we should take care of that.
            int reconciledFromReplica = 0;
            BaseCache replicaCache = storeInterface.getReplicaCache();
            Iterator<ReplicationState> replicatedSessions = replicaCache.values();
            List lbEnabledList = getLbEnabledList();
            while(replicatedSessions.hasNext()) {
                ReplicationState replica = replicatedSessions.next();
                String beKey = (String)replica.getProperty(ReplicationState.BEKEY);
                if(isRightfulOwner(reconilingInstance, beKey) &&
View Full Code Here

       
        BaseCache passivatedSessions = locallyPassivatedSessions;
        SFSBBeanState[] beanStates = null;
        int numberOfIds = passivatedSessions.getEntryCount();
        ArrayList valuesList = new ArrayList(numberOfIds);
        Iterator valuesIter = passivatedSessions.values();
        while(valuesIter.hasNext()) {
            valuesList.add((SFSBBeanState)valuesIter.next());
        }
        SFSBBeanState[] template = new SFSBBeanState[valuesList.size()];
        beanStates = (SFSBBeanState[])valuesList.toArray(template);
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("ReplicatedSFSBStoreManager>>removeExpiredFromLocallyPassivated");
        }       
        ArrayList expiredLocallyPassivated = new ArrayList(30);
        BaseCache locallyPassivatedCache = this.getLocallyPassivatedSessions();
        for(Iterator it = locallyPassivatedCache.values(); it.hasNext();) {
            SFSBBeanState nextBeanState = (SFSBBeanState)it.next();
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("ReplicatedSFSBStoreManager>>removeExpiredFromLocallyPassivated:nextState=" + nextBeanState);
            }
            if(isBeanExpired(nextBeanState)) {
View Full Code Here

            _logger.fine("ReplicatedSFSBStoreManager>>processRemoveExpired");
        }       
        //FIXME finish this
        ArrayList expiredReplicas = new ArrayList(30);
        BaseCache replicasCache = this.getReplicatedSessions();
        for(Iterator it = replicasCache.values(); it.hasNext();) {
            ReplicationState nextState = (ReplicationState)it.next();
            if(_logger.isLoggable(Level.FINE)) {
                _logger.fine("ReplicatedSFSBStoreManager>>processRemoveExpired:nextState=" + nextState);
            }           
            if(nextState.isExpired()) {
View Full Code Here

            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

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.