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

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


   
    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


        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);
    }
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

    private void processTempDestinationAdvisory(TempDestinationAdvisoryEvent event) {
        String clientId = ActiveMQDestination.getClientId(event.getDestination());
        Set set = (Set) tempDestinations.get(clientId);
        if (event.isStarted()) {
            if (set == null) {
                set = new CopyOnWriteArraySet();
                tempDestinations.put(clientId, set);
            }
            set.add(event);
        }
        else {
View Full Code Here

    private void processTempDestinationAdvisory(TempDestinationAdvisoryEvent event) {
        String clientId = ActiveMQDestination.getClientId(event.getDestination());
        Set set = (Set) tempDestinations.get(clientId);
        if (event.isStarted()) {
            if (set == null) {
                set = new CopyOnWriteArraySet();
                tempDestinations.put(clientId, set);
            }
            set.add(event);
        }
        else {
View Full Code Here

/*      */   private final JBossNotificationBroadcasterSupport broadcaster;
/*      */   private MBeanNotificationInfo[] info;
/*      */
/*      */   public UnifiedLoaderRepositoryDCL()
/*      */   {
/*   88 */     this.classLoaders = new CopyOnWriteArraySet();
/*      */
/*   93 */     this.dynamicClassLoaders = new HashSet();
/*      */
/*   99 */     this.nonUCLClassLoader = new HashMap();
/*      */
View Full Code Here

/*      */   private final JBossNotificationBroadcasterSupport broadcaster;
/*      */   private MBeanNotificationInfo[] info;
/*      */
/*      */   public UnifiedLoaderRepository3()
/*      */   {
/*   96 */     this.classLoaders = new CopyOnWriteArraySet();
/*      */
/*  101 */     this.dynamicClassLoaders = new HashSet();
/*      */
/*  107 */     this.nonUCLClassLoader = new HashMap();
/*      */
View Full Code Here

   public void addPerInstanceJoinpointAspect(Joinpoint joinpoint, AspectDefinition def)
   {
      Set joinpoints = (Set) perInstanceJoinpointAspectDefinitions.get(def);
      if (joinpoints == null)
      {
         joinpoints = new CopyOnWriteArraySet();
         perInstanceJoinpointAspectDefinitions.put(def, joinpoints);
         def.registerAdvisor(this);
      }
      joinpoints.add(joinpoint);
   }
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.