Package com.hazelcast.replicatedmap.impl.record

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


            @Override
            public ReplicatedRecordStore createNew(String name) {
                ReplicatedMapConfig replicatedMapConfig = getReplicatedMapConfig(name);
                InMemoryFormat inMemoryFormat = replicatedMapConfig.getInMemoryFormat();
                AbstractReplicatedRecordStore replicatedRecordStorage = null;
                switch (inMemoryFormat) {
                    case OBJECT:
                        replicatedRecordStorage = new ObjectReplicatedRecordStorage(name, nodeEngine,
                                ReplicatedMapService.this);
                        break;
View Full Code Here


    }

    private <K, V> ReplicatedRecord<K, V> getReplicatedRecord(ReplicatedMap<K, V> map, K key)
            throws Exception {
        ReplicatedMapProxy proxy = (ReplicatedMapProxy) map;
        AbstractReplicatedRecordStore store = (AbstractReplicatedRecordStore) REPLICATED_RECORD_STORE.get(proxy);
        return store.getReplicatedRecord(key);
    }
View Full Code Here

    }

    private <K, V> ReplicationPublisher<K, V> getReplicationPublisher(ReplicatedMap<K, V> map)
            throws Exception {
        ReplicatedMapProxy proxy = (ReplicatedMapProxy) map;
        AbstractReplicatedRecordStore store = (AbstractReplicatedRecordStore) REPLICATED_RECORD_STORE.get(proxy);
        return store.getReplicationPublisher();
    }
View Full Code Here

        Member localMember = getNodeEngine().getLocalMember();
        ReplicatedMapService replicatedMapService = getService();
        for (MemberMapPair replicatedMap : replicatedMaps) {
            String mapName = replicatedMap.getName();
            if (localMember.equals(replicatedMap.getMember())) {
                AbstractReplicatedRecordStore recordStorage = (AbstractReplicatedRecordStore) replicatedMapService
                        .getReplicatedRecordStore(mapName, false);

                if (recordStorage != null && recordStorage.isLoaded()) {
                    ReplicationPublisher replicationPublisher = recordStorage.getReplicationPublisher();
                    replicationPublisher.queuePreProvision(getCallerAddress(), chunkSize);
                } else {
                    OperationService operationService = getNodeEngine().getOperationService();
                    Operation operation = new ReplicatedMapInitChunkOperation(mapName, localMember);
                    operationService.send(operation, getCallerAddress());
View Full Code Here

    @Override
    public void run()
            throws Exception {
        ReplicatedMapService replicatedMapService = getService();

        AbstractReplicatedRecordStore recordStorage;
        recordStorage = (AbstractReplicatedRecordStore) replicatedMapService.getReplicatedRecordStore(name, true);

        ReplicationPublisher replicationPublisher = recordStorage.getReplicationPublisher();

        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) {
                recordStorage.finalChunkReceived();
            }
        }
    }
View Full Code Here

TOP

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

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.