Search in sources :

Example 6 with RecordInfo

use of com.hazelcast.map.impl.record.RecordInfo in project hazelcast by hazelcast.

the class MergeOperation method getBackupOperation.

@Override
public Operation getBackupOperation() {
    if (dataValue == null) {
        return new RemoveBackupOperation(name, dataKey, false, disableWanReplicationEvent);
    } else {
        final Record record = recordStore.getRecord(dataKey);
        final RecordInfo replicationInfo = Records.buildRecordInfo(record);
        return new PutBackupOperation(name, dataKey, dataValue, replicationInfo, false, false, disableWanReplicationEvent);
    }
}
Also used : RecordInfo(com.hazelcast.map.impl.record.RecordInfo) Record(com.hazelcast.map.impl.record.Record)

Example 7 with RecordInfo

use of com.hazelcast.map.impl.record.RecordInfo in project hazelcast by hazelcast.

the class PutAllOperation method put.

private void put(Data dataKey, Data dataValue) {
    Object oldValue = putToRecordStore(dataKey, dataValue);
    dataValue = getValueOrPostProcessedValue(dataKey, dataValue);
    mapServiceContext.interceptAfterPut(name, dataValue);
    if (hasMapListener) {
        EntryEventType eventType = (oldValue == null ? ADDED : UPDATED);
        mapEventPublisher.publishEvent(getCallerAddress(), name, eventType, dataKey, oldValue, dataValue);
    }
    Record record = (hasWanReplication || hasBackups) ? recordStore.getRecord(dataKey) : null;
    if (hasWanReplication) {
        EntryView entryView = createSimpleEntryView(dataKey, dataValue, record);
        mapEventPublisher.publishWanReplicationUpdate(name, entryView);
    }
    if (hasBackups) {
        RecordInfo replicationInfo = buildRecordInfo(record);
        backupRecordInfos.add(replicationInfo);
    }
    evict(dataKey);
    if (hasInvalidation) {
        invalidationKeys.add(dataKey);
    }
}
Also used : EntryEventType(com.hazelcast.core.EntryEventType) RecordInfo(com.hazelcast.map.impl.record.RecordInfo) Records.buildRecordInfo(com.hazelcast.map.impl.record.Records.buildRecordInfo) EntryView(com.hazelcast.core.EntryView) EntryViews.createSimpleEntryView(com.hazelcast.map.impl.EntryViews.createSimpleEntryView) Record(com.hazelcast.map.impl.record.Record)

Example 8 with RecordInfo

use of com.hazelcast.map.impl.record.RecordInfo in project hazelcast by hazelcast.

the class TxnSetOperation method getBackupOperation.

public Operation getBackupOperation() {
    final Record record = recordStore.getRecord(dataKey);
    final RecordInfo replicationInfo = record != null ? Records.buildRecordInfo(record) : null;
    return new PutBackupOperation(name, dataKey, dataValue, replicationInfo, true, false);
}
Also used : RecordInfo(com.hazelcast.map.impl.record.RecordInfo) Record(com.hazelcast.map.impl.record.Record) PutBackupOperation(com.hazelcast.map.impl.operation.PutBackupOperation)

Aggregations

RecordInfo (com.hazelcast.map.impl.record.RecordInfo)8 Record (com.hazelcast.map.impl.record.Record)4 PutBackupOperation (com.hazelcast.map.impl.operation.PutBackupOperation)2 Records.applyRecordInfo (com.hazelcast.map.impl.record.Records.applyRecordInfo)2 MapAssignAndGetUuidsOperation (com.hazelcast.client.impl.protocol.task.map.MapAssignAndGetUuidsOperation)1 MapAssignAndGetUuidsOperationFactory (com.hazelcast.client.impl.protocol.task.map.MapAssignAndGetUuidsOperationFactory)1 EntryEventType (com.hazelcast.core.EntryEventType)1 EntryView (com.hazelcast.core.EntryView)1 BatchNearCacheInvalidation (com.hazelcast.internal.nearcache.impl.invalidation.BatchNearCacheInvalidation)1 SingleNearCacheInvalidation (com.hazelcast.internal.nearcache.impl.invalidation.SingleNearCacheInvalidation)1 ArrayDataSerializableFactory (com.hazelcast.internal.serialization.impl.ArrayDataSerializableFactory)1 EntryViews.createSimpleEntryView (com.hazelcast.map.impl.EntryViews.createSimpleEntryView)1 MapEntries (com.hazelcast.map.impl.MapEntries)1 MapEntriesWithCursor (com.hazelcast.map.impl.iterator.MapEntriesWithCursor)1 MapKeysWithCursor (com.hazelcast.map.impl.iterator.MapKeysWithCursor)1 UuidFilter (com.hazelcast.map.impl.nearcache.invalidation.UuidFilter)1 AccumulatorConsumerOperation (com.hazelcast.map.impl.operation.AccumulatorConsumerOperation)1 AddIndexOperation (com.hazelcast.map.impl.operation.AddIndexOperation)1 AddIndexOperationFactory (com.hazelcast.map.impl.operation.AddIndexOperationFactory)1 AddInterceptorOperation (com.hazelcast.map.impl.operation.AddInterceptorOperation)1