Search in sources :

Example 1 with ReplicatedMapKeys

use of com.hazelcast.replicatedmap.impl.client.ReplicatedMapKeys in project hazelcast by hazelcast.

the class KeySetOperation method run.

@Override
public void run() throws Exception {
    ReplicatedMapService service = getService();
    Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(name);
    List keys = new ArrayList();
    for (ReplicatedRecordStore store : stores) {
        keys.addAll(store.keySet(false));
    }
    ArrayList<Data> dataKeys = new ArrayList<Data>(keys.size());
    SerializationService serializationService = getNodeEngine().getSerializationService();
    for (Object key : keys) {
        dataKeys.add(serializationService.toData(key));
    }
    response = new ReplicatedMapKeys(dataKeys);
}
Also used : ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) ArrayList(java.util.ArrayList) ReplicatedMapKeys(com.hazelcast.replicatedmap.impl.client.ReplicatedMapKeys) SerializationService(com.hazelcast.spi.serialization.SerializationService) List(java.util.List) ArrayList(java.util.ArrayList) Data(com.hazelcast.nio.serialization.Data)

Aggregations

Data (com.hazelcast.nio.serialization.Data)1 ReplicatedMapService (com.hazelcast.replicatedmap.impl.ReplicatedMapService)1 ReplicatedMapKeys (com.hazelcast.replicatedmap.impl.client.ReplicatedMapKeys)1 ReplicatedRecordStore (com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore)1 SerializationService (com.hazelcast.spi.serialization.SerializationService)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1