Package com.hazelcast.concurrent.semaphore

Examples of com.hazelcast.concurrent.semaphore.Permit


        return new SemaphoreWaitNotifyKey(name, "acquire");
    }

    @Override
    public boolean shouldWait() {
        Permit permit = getPermit();
        return getWaitTimeout() != 0 && !permit.isAvailable(permitCount);
    }
View Full Code Here


        super(name, permitCount, firstCaller);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        permit.release(permitCount, firstCaller);
        response = true;
    }
View Full Code Here

        super(name, permitCount);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        permit.release(permitCount, getCallerUuid());
        response = true;
    }
View Full Code Here

        super(name, -1, firstCaller);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        permit.memberRemoved(firstCaller);
        response = true;
    }
View Full Code Here

        super(name, -1);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        response = permit.drain(getCallerUuid());
    }
View Full Code Here

        super(name, permitCount, firstCaller);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        permit.drain(firstCaller);
        response = true;
    }
View Full Code Here

        super(name, permitCount);
    }

    @Override
    public void run() throws Exception {
        Permit permit = getPermit();
        response = permit.reduce(permitCount);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.concurrent.semaphore.Permit

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.