Search in sources :

Example 1 with EntryBackupProcessor

use of com.hazelcast.map.EntryBackupProcessor in project eventapis by kloiasoft.

the class OperationTest method testReadWriteExternal.

@Test
public void testReadWriteExternal() throws Exception {
    HazelcastInstance hazelcastInstance = Hazelcast.newHazelcastInstance();
    IMap<Object, Object> test = hazelcastInstance.getMap("test");
    test.executeOnKey("123", new EntryProcessor() {

        @Override
        public Object process(Map.Entry entry) {
            entry.setValue("Blabla");
            return entry;
        }

        @Override
        public EntryBackupProcessor getBackupProcessor() {
            return null;
        }
    });
    System.out.println(test.get("123"));
}
Also used : EntryProcessor(com.hazelcast.map.EntryProcessor) HazelcastInstance(com.hazelcast.core.HazelcastInstance) EntryBackupProcessor(com.hazelcast.map.EntryBackupProcessor) IMap(com.hazelcast.core.IMap) Map(java.util.Map) Test(org.junit.Test)

Example 2 with EntryBackupProcessor

use of com.hazelcast.map.EntryBackupProcessor in project hazelcast by hazelcast.

the class MultipleEntryWithPredicateOperation method getBackupOperation.

@Override
public Operation getBackupOperation() {
    EntryBackupProcessor backupProcessor = entryProcessor.getBackupProcessor();
    MultipleEntryWithPredicateBackupOperation backupOperation = new MultipleEntryWithPredicateBackupOperation(name, keys, backupProcessor, predicate);
    backupOperation.setWanEventList(wanEventList);
    return backupOperation;
}
Also used : EntryBackupProcessor(com.hazelcast.map.EntryBackupProcessor)

Example 3 with EntryBackupProcessor

use of com.hazelcast.map.EntryBackupProcessor in project hazelcast by hazelcast.

the class PartitionWideEntryOperation method getBackupOperation.

@Override
public Operation getBackupOperation() {
    EntryBackupProcessor backupProcessor = entryProcessor.getBackupProcessor();
    PartitionWideEntryBackupOperation backupOperation = null;
    if (backupProcessor != null) {
        backupOperation = new PartitionWideEntryBackupOperation(name, backupProcessor);
        backupOperation.setWanEventList(wanEventList);
    }
    return backupOperation;
}
Also used : EntryBackupProcessor(com.hazelcast.map.EntryBackupProcessor)

Example 4 with EntryBackupProcessor

use of com.hazelcast.map.EntryBackupProcessor in project hazelcast by hazelcast.

the class PartitionWideEntryWithPredicateOperation method getBackupOperation.

@Override
public Operation getBackupOperation() {
    EntryBackupProcessor backupProcessor = entryProcessor.getBackupProcessor();
    PartitionWideEntryWithPredicateBackupOperation backupOperation = null;
    if (backupProcessor != null) {
        backupOperation = new PartitionWideEntryWithPredicateBackupOperation(name, backupProcessor, predicate);
        backupOperation.setWanEventList(wanEventList);
    }
    return backupOperation;
}
Also used : EntryBackupProcessor(com.hazelcast.map.EntryBackupProcessor)

Aggregations

EntryBackupProcessor (com.hazelcast.map.EntryBackupProcessor)4 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 IMap (com.hazelcast.core.IMap)1 EntryProcessor (com.hazelcast.map.EntryProcessor)1 Map (java.util.Map)1 Test (org.junit.Test)1