Package com.hazelcast.map.record

Examples of com.hazelcast.map.record.RecordInfo


    }

    protected void readInternal(ObjectDataInput in) throws IOException {
        super.readInternal(in);
        unlockKey = in.readBoolean();
        recordInfo = new RecordInfo();
        recordInfo.readData(in);
    }
View Full Code Here


    public Operation getBackupOperation() {
        if(dataValue == null) {
            return new RemoveBackupOperation(name, dataKey);
        }
        else {
            RecordInfo replicationInfo = mapService.createRecordInfo(mapContainer,
                    recordStore.getRecord(dataKey));
            return new PutBackupOperation(name, dataKey, dataValue, replicationInfo);
        }
    }
View Full Code Here

                    Record record = recordStore.getRecord(dataKey);
                    final SimpleEntryView entryView = mapService.createSimpleEntryView(dataKey,mapService.toData(dataValue),record);
                    mapService.publishWanReplicationUpdate(name, entryView);
                }
                backupEntrySet.add(entry);
                RecordInfo replicationInfo = mapService.createRecordInfo(mapContainer,
                        recordStore.getRecord(dataKey));
                backupRecordInfos.add(replicationInfo);
            }
        }
        invalidateNearCaches(keysToInvalidate);
View Full Code Here

    public void run() {
        int partitionId = getPartitionId();
        recordStore = mapService.getRecordStore(partitionId, name);
        for (int i = 0; i < entries.size(); i++) {
            final RecordInfo recordInfo = recordInfos.get(i);
            final Map.Entry<Data,Data> entry = entries.get(i);
            final Record record = recordStore.putBackup(entry.getKey(), entry.getValue(), -1, false);
            mapService.applyRecordInfo(record, name, recordInfo);
        }
    }
View Full Code Here

        entries = new ArrayList<Map.Entry<Data,Data>>(size);
        recordInfos = new ArrayList<RecordInfo>(size);
        for (int i = 0; i < size; i++) {
            Map.Entry entry = new AbstractMap.SimpleImmutableEntry<Data, Data>(IOUtil.readData(in), IOUtil.readData(in));
            entries.add(entry);
            final RecordInfo recordInfo = new RecordInfo();
            recordInfo.readData(in);
            recordInfos.add(recordInfo);
        }

    }
View Full Code Here

        return true;
    }

    public Operation getBackupOperation() {
        Record record = recordStore.getRecord(dataKey);
        RecordInfo replicationInfo = mapService.createRecordInfo(mapContainer, record);
        return new PutBackupOperation(name, dataKey, dataValue, replicationInfo);
    }
View Full Code Here

            scheduleMapStoreDelete(mapName, record.getKey(), replicationInfo.getMapStoreDeleteDelayMillis());
        }
    }

    public RecordReplicationInfo createRecordReplicationInfo(MapContainer mapContainer, Record record) {
        final RecordInfo info = constructRecordInfo(mapContainer, record, replicaWaitMillisForScheduledTasks);
        final RecordReplicationInfo replicationInfo
                = new RecordReplicationInfo(record.getKey(), toData(record.getValue()), info);
        return replicationInfo;
    }
View Full Code Here

        // completed if the owner of the record could not complete task before promotion
        return constructRecordInfo(mapContainer, record, replicaWaitMillisForScheduledTasks);
    }

    private RecordInfo constructRecordInfo(MapContainer mapContainer, Record record, long extraDelay) {
        final RecordInfo info = new RecordInfo();
        info.setStatistics(record.getStatistics());
        info.setVersion(record.getVersion());
        info.setEvictionCriteriaNumber(record.getEvictionCriteriaNumber());
        setDelays(mapContainer, info, record.getKey(), extraDelay);
        return info;
    }
View Full Code Here

    public boolean shouldNotify() {
        return true;
    }

    public Operation getBackupOperation() {
        RecordInfo replicationInfo = mapService.createRecordInfo(mapContainer, recordStore.getRecord(dataKey));
        return new PutBackupOperation(name, dataKey, dataValue, replicationInfo, true);
    }
View Full Code Here

                        final EntryView entryView = EntryViews.createSimpleEntryView(dataKey, dataValueAsData, record);
                        mapEventPublisher.publishWanReplicationUpdate(name, entryView);
                    }
                }
                backupEntrySet.add(entry);
                RecordInfo replicationInfo = Records.buildRecordInfo(recordStore.getRecord(dataKey));
                backupRecordInfos.add(replicationInfo);
            }
        }
        invalidateNearCaches(keysToInvalidate);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.map.record.RecordInfo

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.