Package org.jgroups.blocks.locking

Examples of org.jgroups.blocks.locking.LockService


    protected JChannel    ch;
    protected LockService lock_service;

    @BeforeMethod protected void init() throws Exception {
        ch=new JChannel(Util.getTestStack(new CENTRAL_LOCK())).name("A");
        lock_service=new LockService(ch);
        ch.connect("LockServiceConcurrencyTest");
    }
View Full Code Here



    @BeforeClass
    protected void init() throws Exception {
        c1=createChannel("A");
        s1=new LockService(c1);
        c1.connect("LockServiceTest");

        c2=createChannel("B");
        s2=new LockService(c2);
        c2.connect("LockServiceTest");

        c3=createChannel("C");
        s3=new LockService(c3);
        c3.connect("LockServiceTest");

        Util.waitUntilAllChannelsHaveSameSize(10000, 1000, c1,c2,c3);
        lock=s1.getLock(LOCK);
    }
View Full Code Here

  void setUp() throws Exception {
    System.out.print("Connecting channels: ");
        a=createChannel("A");
        disp_a=new MessageDispatcher(a, null, null);
        a.connect(RpcLockingTest.class.getSimpleName());
        lock_a=new LockService(a).getLock("lock");

        b=createChannel("B");
        disp_b=new MessageDispatcher(b, null, null);
        b.connect(RpcLockingTest.class.getSimpleName());
        lock_b=new LockService(b).getLock("lock");

    Util.waitUntilAllChannelsHaveSameSize(30000, 1000, a, b);
    System.out.println("");

        disp_a.setRequestHandler(new RequestHandler() {
View Full Code Here

TOP

Related Classes of org.jgroups.blocks.locking.LockService

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.