Examples of CopyOnWriteArrayList


Examples of java.util.concurrent.CopyOnWriteArrayList

        }
    }

    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> void addConfigEventListener(T type, ConfigEventListener<T,C> listener)
    {
        CopyOnWriteArrayList listeners = _listenerMap.get(type);
        if(listeners == null)
        {
            listeners = new CopyOnWriteArrayList();
            CopyOnWriteArrayList oldListeners = _listenerMap.putIfAbsent(type, listeners);
            if(oldListeners != null)
            {
                listeners = oldListeners;
            }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    }

    public <T extends ConfigObjectType<T, C>, C extends ConfiguredObject<T, C>> void removeConfigEventListener(T type, ConfigEventListener<T,C> listener)
    {
        CopyOnWriteArrayList listeners = _listenerMap.get(type);
        if(listeners != null)
        {
            listeners.remove(listener);
        }
    }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    /**
     * Create an instance with the given delegates.
     */
    public MultiLogFactory(LogFactory[] delegates) {
        _delegates = new CopyOnWriteArrayList(Arrays.asList(delegates));
    }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    @SuppressWarnings("unchecked")
    protected void addChildService(Object childService) {
        synchronized (this) {
            if (childServices == null) {
                childServices = new CopyOnWriteArrayList();
            }
        }
        childServices.add(childService);
    }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    @SuppressWarnings("unchecked")
    protected void addChildService(Object childService) {
        synchronized (this) {
            if (childServices == null) {
                childServices = new CopyOnWriteArrayList();
            }
        }
        childServices.add(childService);
    }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

        {
            beanEntryStorage = (List)factoryMap.get(INJECTED_BEAN_STORAGE_KEY);

            if (beanEntryStorage == null)
            {
                beanEntryStorage = new CopyOnWriteArrayList();
                factoryMap.put(INJECTED_BEAN_STORAGE_KEY, beanEntryStorage);
            }
        }

        List<String> classNames;
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

                // no recorded local node id, generating a new one and saving it
                id = generate();
                logger.info("No saved local node id, using newly generated: {}", id);
                SystemTable.writeCurrentLocalNodeId(null, id);
                current = new AtomicReference<NodeId>(id);
                olds = new CopyOnWriteArrayList();
            }
            else
            {
                logger.info("Saved local node id: {}", id);
                current = new AtomicReference<NodeId>(id);
                olds = new CopyOnWriteArrayList(SystemTable.getOldLocalNodeIds());
            }
        }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    @SuppressWarnings("unchecked")
    protected void addChildService(Object childService) {
        synchronized (this) {
            if (childServices == null) {
                childServices = new CopyOnWriteArrayList();
            }
        }
        childServices.add(childService);
    }
View Full Code Here

Examples of java.util.concurrent.CopyOnWriteArrayList

    private static<T extends ParamValidator> void addValidators (ConcurrentHashMap<Class, List<ParamValidator>> map, Class<T> clazz,
                                                                 T requiredValidator, T noneRequiredValidator) {

        // use <CopyOnWriteArrayList> in case validators are added while initializing parameters through <getValidator> method.
        List validators = new CopyOnWriteArrayList(new ParamValidator[]{requiredValidator, noneRequiredValidator});
        map.put(clazz, validators);
    }
View Full Code Here

Examples of org.apache.openjpa.lib.util.concurrent.CopyOnWriteArrayList

    /**
     * Create an instance with the given delegates.
     */
    public MultiLogFactory(LogFactory[] delegates) {
        _delegates = new CopyOnWriteArrayList(Arrays.asList(delegates));
    }
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.