Package com.hazelcast.replicatedmap.impl.record

Examples of com.hazelcast.replicatedmap.impl.record.ReplicatedRecord


            }
        }, 60, EntryEventType.UPDATED, operations, 0.75, map1, map2);

        int map2Updated = 0;
        for (Map.Entry<String, String> entry : map2.entrySet()) {
            ReplicatedRecord record = getReplicatedRecord(map2, entry.getKey());
            if (record.getTtlMillis() > 0) {
                map2Updated++;
            }
        }
        int map1Updated = 0;
        for (Map.Entry<String, String> entry : map1.entrySet()) {
            ReplicatedRecord record = getReplicatedRecord(map1, entry.getKey());
            if (record.getTtlMillis() > 0) {
                map1Updated++;
            }
        }

        assertMatchSuccessfulOperationQuota(0.75, operations, map1Updated, map2Updated);
View Full Code Here


                return new VectorClockTimestamp();
            }
        };
        constructors[RECORD] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {
            public IdentifiedDataSerializable createNew(Integer arg) {
                return new ReplicatedRecord();
            }
        };
        constructors[REPL_UPDATE_MESSAGE] = new ConstructorFunction<Integer, IdentifiedDataSerializable>() {
            public IdentifiedDataSerializable createNew(Integer arg) {
                return new ReplicationMessage();
View Full Code Here

        if (notYetReadyChooseSomeoneElse) {
            replicationPublisher.retryWithDifferentReplicationNode(origin);
        } else {
            for (int i = 0; i < recordCount; i++) {
                ReplicatedRecord record = replicatedRecords[i];

                Object key = record.getKey();
                Object value = record.getValue();
                VectorClockTimestamp timestamp = record.getVectorClockTimestamp();
                int updateHash = record.getLatestUpdateHash();
                long ttlMillis = record.getTtlMillis();

                ReplicationMessage update = new ReplicationMessage(name, key, value, timestamp, origin, updateHash, ttlMillis);
                replicationPublisher.queueUpdateMessage(update);
            }
            if (finalChunk) {
View Full Code Here

        origin = new MemberImpl();
        origin.readData(in);
        recordCount = in.readInt();
        replicatedRecords = new ReplicatedRecord[recordCount];
        for (int i = 0; i < recordCount; i++) {
            ReplicatedRecord replicatedRecord = new ReplicatedRecord();
            replicatedRecord.readData(in);
            replicatedRecords[i] = replicatedRecord;
        }
        finalChunk = in.readBoolean();
    }
View Full Code Here

    @Override
    public Object call()
            throws Exception {

        ReplicatedRecordStore recordStore = getReplicatedRecordStore();
        ReplicatedRecord record = recordStore.getReplicatedRecord(key);

        Object value = null;
        long ttl = 0;
        long updateTime = 0;
        if (record != null) {
            value = recordStore.unmarshallValue(record.getValue());
            ttl = record.getTtlMillis();
            updateTime = record.getUpdateTime();
        }
        return new ReplicatedMapGetResponse(value, ttl, updateTime);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.replicatedmap.impl.record.ReplicatedRecord

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.