Package edu.emory.mathcs.backport.java.util.concurrent

Examples of edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArraySet


    private void addRemotePacket(String containerName, ComponentPacket packet) {
        networkComponentKeyMap.put(packet.getComponentNameSpace(), containerName);
        Set set = (Set) networkNodeKeyMap.get(containerName);
        if (set == null) {
            set = new CopyOnWriteArraySet();
            networkNodeKeyMap.put(containerName, set);
        }
        ComponentConnector cc = new ComponentConnector(packet);
        log.info("Adding Remote Component: " + cc);
        broker.getRegistry().addRemoteComponentConnector(cc);
View Full Code Here


    private void addRemotePacket(Destination nodeName, ComponentPacket packet) {
        clusterComponentKeyMap.put(packet.getComponentNameSpace(), nodeName);
        Set set = (Set) clusterNodeKeyMap.get(nodeName);
        if (set == null) {
            set = new CopyOnWriteArraySet();
            clusterNodeKeyMap.put(nodeName, set);
            ComponentConnector cc = new ComponentConnector(packet);
            log.info("Adding Remote Component: " + cc);
            broker.getRegistry().addRemoteComponentConnector(cc);
        }
View Full Code Here

    private void addRemotePacket(String containerName, ComponentPacket packet) {
        networkComponentKeyMap.put(packet.getComponentNameSpace(), containerName);
        Set set = (Set) networkNodeKeyMap.get(containerName);
        if (set == null) {
            set = new CopyOnWriteArraySet();
            networkNodeKeyMap.put(containerName, set);
        }
        ComponentConnector cc = new ComponentConnector(packet);
        log.info("Adding Remote Component: " + cc);
        broker.getRegistry().addRemoteComponentConnector(cc);
View Full Code Here

    public void stop() throws Exception {
        this.subscriptionRecoveryPolicy.stop();
    }
   
    public Message[] browse(){
        final Set result=new CopyOnWriteArraySet();
        try{
            if(store!=null){
                store.recover(new MessageRecoveryListener(){
                    public void recoverMessage(Message message) throws Exception{
                        result.add(message);
                    }

                    public void recoverMessageReference(String messageReference) throws Exception{}

                    public void finished(){}
                });
                Message[] msgs=subscriptionRecoveryPolicy.browse(getActiveMQDestination());
                if(msgs!=null){
                    for(int i=0;i<msgs.length;i++){
                        result.add(msgs[i]);
                    }
                }
            }
        }catch(Throwable e){
            log.warn("Failed to browse Topic: "+getActiveMQDestination().getPhysicalName(),e);
        }
        return (Message[]) result.toArray(new Message[result.size()]);
    }
View Full Code Here

    private Set flowLinks;
   
    public DotViewFlowListener() {
        setFile("ServiceMixFlow.dot");
        flow = new ConcurrentHashMap();
        flowLinks = new CopyOnWriteArraySet();
    }
View Full Code Here

    private boolean displayComponents = true;
   
    public DotViewFlowListener() {
        setFile("ServiceMixFlow.dot");
        flow = new ConcurrentHashMap();
        flowLinks = new CopyOnWriteArraySet();
        usedComponents = new CopyOnWriteArraySet();
        componentsAsConsumer = new CopyOnWriteArraySet();
    }
View Full Code Here

    public void stop() throws Exception {
        this.subscriptionRecoveryPolicy.stop();
    }
   
    public Message[] browse(){
        final Set result=new CopyOnWriteArraySet();
        try{
            if(store!=null){
                store.recover(new MessageRecoveryListener(){
                    public void recoverMessage(Message message) throws Exception{
                        result.add(message);
                    }

                    public void recoverMessageReference(String messageReference) throws Exception{}

                    public void finished(){}
                });
                Message[] msgs=subscriptionRecoveryPolicy.browse(getActiveMQDestination());
                if(msgs!=null){
                    for(int i=0;i<msgs.length;i++){
                        result.add(msgs[i]);
                    }
                }
            }
        }catch(Throwable e){
            log.warn("Failed to browse Topic: "+getActiveMQDestination().getPhysicalName(),e);
        }
        return (Message[]) result.toArray(new Message[result.size()]);
    }
View Full Code Here

TOP

Related Classes of edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArraySet

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.