Package com.hazelcast.concurrent.atomiclong

Examples of com.hazelcast.concurrent.atomiclong.LongWrapper


        return AtomicLongDataSerializerHook.ALTER;
    }

    @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

    @Override
    public void run() throws Exception {
        AtomicLongService atomicLongService = getService();
        for (Map.Entry<String, Long> longEntry : migrationData.entrySet()) {
            String name = longEntry.getKey();
            LongWrapper number = atomicLongService.getNumber(name);
            Long value = longEntry.getValue();
            number.set(value);
        }
    }
View Full Code Here

        this.delta = delta;
    }

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

        return AtomicLongDataSerializerHook.GET_AND_ALTER;
    }

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

        long input = number.get();
        response = input;
        long output = function.apply(input);
        shouldBackup = input != output;
        if (shouldBackup) {
            backup = output;
            number.set(output);
        }
    }
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.