Examples of LazyReplicatedMap


Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

        result.mapSendOptions = mapSendOptions;
        return result;
    }

    public int getActiveSessionsFull() {
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        return map.sizeFull();
    }

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

        return map.sizeFull();
    }

    public String listSessionIdsFull() {
        StringBuilder sb=new StringBuilder();
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        @SuppressWarnings("unchecked") // sessions is of type Map<String, Session>
        Iterator<String> keys = map.keySetFull().iterator();
        while (keys.hasNext()) {
            sb.append(keys.next()).append(" ");
        }
        return sb.toString();
    }

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

        return sb.toString();
    }
   
    public Set<String> getSessionIdsFull() {
        Set<String> sessionIds = new HashSet<String>();
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        @SuppressWarnings("unchecked") // sessions is of type Map<String, Session>
        Iterator<String> keys = map.keySetFull().iterator();
        while (keys.hasNext()) {
            sessionIds.add(keys.next());
        }
        return sessionIds;
    }

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

   
    protected LazyReplicatedMap map;
    protected SimpleTableDemo table;
   
    public MapDemo(Channel channel, String mapName ) {
        map = new LazyReplicatedMap(null,channel,5000, mapName,null);
        table = SimpleTableDemo.createAndShowGUI(map,channel.getLocalMember(false).getName());
        channel.addChannelListener(this);
        channel.addMembershipListener(this);
//        for ( int i=0; i<1000; i++ ) {
//            map.put("MyKey-"+i,"My String Value-"+i);

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

    public void unload() throws IOException {
    }
   
    public ClusterMessage requestCompleted(String sessionId) {
        if ( !this.started ) return null;
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        map.replicate(sessionId,false);
        return null;
    }

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

    public void start() throws LifecycleException {
        if ( this.started ) return;
        try {
            CatalinaCluster catclust = (CatalinaCluster)cluster;
            catclust.addManager(getName(), this);
            LazyReplicatedMap map = new LazyReplicatedMap(this,
                                                          catclust.getChannel(),
                                                          DEFAULT_REPL_TIMEOUT,
                                                          getMapName(),
                                                          getClassLoaders());
            map.setChannelSendOptions(mapSendOptions);
            this.sessions = map;
            super.start();
        catch ( Exception x ) {
            log.error("Unable to start BackupManager",x);
            throw new LifecycleException("Failed to start BackupManager",x);

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

     *  that needs to be reported
     */
    public void stop() throws LifecycleException
    {
       
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        if ( map!=null ) {
            map.breakdown();
        }
        if ( !this.started ) return;
        try {
        } catch ( Exception x ){
            log.error("Unable to stop BackupManager",x);

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

    public void unload() throws IOException {
    }
   
    public ClusterMessage requestCompleted(String sessionId) {
        if ( !this.started ) return null;
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        map.replicate(sessionId,false);
        return null;
    }

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

        if ( this.started ) return;
       
        try {
            cluster.registerManager(this);
            CatalinaCluster catclust = (CatalinaCluster)cluster;
            LazyReplicatedMap map = new LazyReplicatedMap(this,
                                                          catclust.getChannel(),
                                                          DEFAULT_REPL_TIMEOUT,
                                                          getMapName(),
                                                          getClassLoaders());
            map.setChannelSendOptions(mapSendOptions);
            this.sessions = map;
            super.start();
            this.started = true;
        catch ( Exception x ) {
            log.error("Unable to start BackupManager",x);

Examples of org.apache.catalina.tribes.tipis.LazyReplicatedMap

     *  that needs to be reported
     */
    public void stop() throws LifecycleException
    {
       
        LazyReplicatedMap map = (LazyReplicatedMap)sessions;
        if ( map!=null ) {
            map.breakdown();
        }
        if ( !this.started ) return;
        try {
        } catch ( Exception x ){
            log.error("Unable to stop BackupManager",x);
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.