Search in sources :

Example 1 with AtomicReferenceService

use of com.hazelcast.concurrent.atomicreference.AtomicReferenceService in project hazelcast by hazelcast.

the class AtomicReferenceReplicationOperation method run.

@Override
public void run() throws Exception {
    AtomicReferenceService atomicReferenceService = getService();
    for (Map.Entry<String, Data> entry : migrationData.entrySet()) {
        String name = entry.getKey();
        AtomicReferenceContainer atomicReferenceContainer = atomicReferenceService.getReferenceContainer(name);
        Data value = entry.getValue();
        atomicReferenceContainer.set(value);
    }
}
Also used : AtomicReferenceContainer(com.hazelcast.concurrent.atomicreference.AtomicReferenceContainer) Data(com.hazelcast.nio.serialization.Data) Map(java.util.Map) HashMap(java.util.HashMap) AtomicReferenceService(com.hazelcast.concurrent.atomicreference.AtomicReferenceService)

Aggregations

AtomicReferenceContainer (com.hazelcast.concurrent.atomicreference.AtomicReferenceContainer)1 AtomicReferenceService (com.hazelcast.concurrent.atomicreference.AtomicReferenceService)1 Data (com.hazelcast.nio.serialization.Data)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1