Package com.hazelcast.concurrent.atomiclong

Examples of com.hazelcast.concurrent.atomiclong.LongWrapper


        this.update = update;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = number.compareAndSet(expect, update);
        shouldBackup = !returnValue;
    }
View Full Code Here


        this.function = function;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = function.apply(number.get());
    }
View Full Code Here

        super(name);
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = number.get();
    }
View Full Code Here

        this.newValue = newValue;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        number.set(newValue);
    }
View Full Code Here

        this.delta = delta;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = number.addAndGet(delta);
    }
View Full Code Here

        this.delta = delta;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = number.getAndAdd(delta);
    }
View Full Code Here

        super(name, function);
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();

        long input = number.get();
        long output = function.apply(input);
        shouldBackup = input != output;
        if (shouldBackup) {
            backup = output;
            number.set(output);
        }

        response = output;
    }
View Full Code Here

        super(name, function);
    }

    @Override
    public void run() throws Exception {
        LongWrapper reference = getNumber();

        long input = reference.get();
        long output = function.apply(input);
        shouldBackup = input != output;
        if (shouldBackup) {
            backup = output;
            reference.set(backup);
        }
    }
View Full Code Here

        this.newValue = newValue;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        returnValue = number.getAndSet(newValue);
    }
View Full Code Here

        this.newValue = newValue;
    }

    @Override
    public void run() throws Exception {
        LongWrapper number = getNumber();
        number.set(newValue);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.concurrent.atomiclong.LongWrapper

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.