Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.CopyOnWriteArraySet


    protected void initializeOther(AbstractPacket other) {
        initializeBrokersVisited();
        other.id = this.id;
        other.receiptRequired = this.receiptRequired;
        other.memoryUsage = this.memoryUsage;
        CopyOnWriteArraySet set = this.brokersVisited;
        if (set != null && !set.isEmpty()){
            other.brokersVisited = new CopyOnWriteArraySet(set);
        }
    }
View Full Code Here


        }
    }
   
    synchronized void initializeBrokersVisited(){
        if (this.brokersVisited == null){
            this.brokersVisited = new CopyOnWriteArraySet();
        }
    }
View Full Code Here

    protected void initializeOther(AbstractPacket other) {
        initializeBrokersVisited();
        other.id = this.id;
        other.receiptRequired = this.receiptRequired;
        other.memoryUsage = this.memoryUsage;
        CopyOnWriteArraySet set = this.brokersVisited;
        if (set != null && !set.isEmpty()){
            other.brokersVisited = new CopyOnWriteArraySet(set);
        }
    }
View Full Code Here

        }
    }
   
    synchronized void initializeBrokersVisited(){
        if (this.brokersVisited == null){
            this.brokersVisited = new CopyOnWriteArraySet();
        }
    }
View Full Code Here

        this.clientIds = new ConcurrentHashMap();
        this.consumerInfos = new ConcurrentHashMap();
        this.producerInfos = new ConcurrentHashMap();
        this.transportConnectors = new CopyOnWriteArrayList();
        this.networkConnectors = new CopyOnWriteArrayList();
        this.remoteClientIds = new CopyOnWriteArraySet();
        this.broker.addCapacityEventListener(this);

        // lets register ourselves with the context
        context.registerContainer(broker.getBrokerName(), this);
        //register ourselves for vm:// transports
View Full Code Here

     * @param destination
     * @return the set of ProducerInfo objects currently active
     */
    public Set activeProducers(Destination destination) {
        Set set = (Set) activeProducers.get(destination);
        return set != null ? set : new CopyOnWriteArraySet();
    }
View Full Code Here

   
    private void updateActiveProducers(ProducerInfo info) {
        Set set = (Set) activeProducers.get(info.getDestination());
        if (info.isStarted()) {
            if (set == null) {
                set = new CopyOnWriteArraySet();
                activeProducers.put(info.getDestination(), set);
            }
            set.add(info);
        }
        else {
View Full Code Here

     * @param destination
     * @return the set of currently active ConsumerInfo objects
     */
    public Set activeConsumers(Destination destination) {
        Set set = (Set) activeSubscribers.get(destination);
        return set != null ? set : new CopyOnWriteArraySet();
    }
View Full Code Here

    private void updateActiveConsumers(ConsumerInfo info) {
        Set set = (Set) activeSubscribers.get(info.getDestination());
        if (info.isStarted()) {
            if (set == null) {
                set = new CopyOnWriteArraySet();
                activeSubscribers.put(info.getDestination(), set);
            }
            set.add(info);
        }
        else {
View Full Code Here

    protected void initializeOther(AbstractPacket other) {
        initializeBrokersVisited();
        other.id = this.id;
        other.receiptRequired = this.receiptRequired;
        other.memoryUsage = this.memoryUsage;
        CopyOnWriteArraySet set = this.brokersVisited;
        if (set != null && !set.isEmpty()){
            other.brokersVisited = new CopyOnWriteArraySet(set);
        }
    }
View Full Code Here

TOP

Related Classes of EDU.oswego.cs.dl.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.