Examples of SynchronizedBoolean


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

        this.containers = new ConcurrentHashMap();
        this.destinationMap = new DestinationMap();
        this.destinations = new ConcurrentHashMap();
        this.subscriptions = new ConcurrentHashMap();
        this.filterFactory = new FilterFactoryImpl();
        this.started = new SynchronizedBoolean(false);
        this.doingGarbageCollection = new SynchronizedBoolean(false);
    }
View Full Code Here

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

    private Thread thread; //need to change this - and use a thread pool
    private PacketListener sendListener;
    private VmTransportChannel clientSide;

    public VmTransportChannel() {
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
    }
View Full Code Here

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

        this.queueManager = mgr;
        this.containers = new ConcurrentHashMap();
        this.destinationMap = new DestinationMap();
        this.destinations = new ConcurrentHashMap();
        this.filterFactory = new FilterFactoryImpl();
        this.started = new SynchronizedBoolean(false);
    }
View Full Code Here

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

    /**
     * Default Constructor of BrokerClientImpl
     */
    public BrokerClientImpl() {
        this.packetIdGenerator = new IdGenerator();
        this.closed = new SynchronizedBoolean(false);
        this.activeConsumers = new HashSet();
        this.consumers = new CopyOnWriteArrayList();
        this.producers = new CopyOnWriteArrayList();
        this.transactions = new CopyOnWriteArrayList();
        this.xatransactions = new CopyOnWriteArrayList();
View Full Code Here

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

    /**
     * Construct basic helpers
     */
    protected GTransportChannel(WireFormat wireFormat, ThreadPool tp) {
        this.wireFormat = wireFormat;
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        dispatchLatch = new Latch();
        threadPool = tp;
    }
View Full Code Here

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

     * @param queue
     */
    public TransientTopicBoundedMessageContainer(BrokerClient client, BoundedPacketQueue queue) {
        this.client = client;
        this.queue = queue;
        this.started = new SynchronizedBoolean(false);
        this.subscriptions = new CopyOnWriteArrayList();
        this.log = LogFactory.getLog("TransientTopicBoundedMessageContainer:- " + client);
    }
View Full Code Here

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

    public void testClose() {
        /** @todo: Insert test code here. Use assertEquals(), for example. */
        final MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue(QUEUE_NAME);
        memoryManager.setValueLimit(TEST_ENQUEUE_SIZE);
        final SynchronizedBoolean success = new SynchronizedBoolean(false);
        final MemoryBoundedQueue q1 = queueManager.getMemoryBoundedQueue(QUEUE_NAME);
        assertTrue(queue == q1);
        Thread t = new Thread(new Runnable() {
            public void run() {
                try {
                    Thread.sleep(250);
                    queue.dequeue();
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
                synchronized (success) {
                    success.set(true);
                    success.notify();
                }
            }
        });
        t.start();
        queue.close();
        try {
            synchronized (success) {
                if (!success.get()) {
                    success.wait(2000);
                }
            }
        }
        catch (Throwable e) {
            e.printStackTrace();
        }
        assertTrue(success.get());
      
        MemoryBoundedQueue q2 = queueManager.getMemoryBoundedQueue(QUEUE_NAME);
        assertTrue(queue != q2);
    }
View Full Code Here

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

    public TransientTopicBoundedMessageContainer(TransientTopicBoundedMessageManager manager, BrokerClient client,
            MemoryBoundedQueue queue) {
        this.manager = manager;
        this.client = client;
        this.queue = queue;
        this.started = new SynchronizedBoolean(false);
        this.subscriptions = new CopyOnWriteArrayList();
        this.log = LogFactory.getLog("TransientTopicBoundedMessageContainer:- " + client);
    }
View Full Code Here

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

     * @throws JMSException
     */
    public TcpTransportServerChannel(WireFormat wireFormat, URI bindAddr) throws JMSException {
        super(bindAddr);
        this.wireFormat = wireFormat;
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        try {
            serverSocket = createServerSocket(bindAddr);
            serverSocket.setSoTimeout(2000);
            updatePhysicalUri(bindAddr);
        }
View Full Code Here

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

    public TcpTransportServerChannel(WireFormat wireFormat, ServerSocket serverSocket) throws JMSException {
        super(serverSocket.getInetAddress().toString());
        this.wireFormat = wireFormat;
        this.serverSocket = serverSocket;
        closed = new SynchronizedBoolean(false);
        started = new SynchronizedBoolean(false);
        InetAddress address = serverSocket.getInetAddress();
        try {
            updatePhysicalUri(new URI("tcp", "", address.getHostName(), 0, "", "", ""));
        }
        catch (URISyntaxException e) {
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.