use of com.hazelcast.replicatedmap.impl.client.ReplicatedMapValueCollection in project hazelcast by hazelcast.
the class ValuesOperation method run.
@Override
public void run() throws Exception {
ReplicatedMapService service = getService();
Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(name);
Collection<ReplicatedRecord> values = new ArrayList<ReplicatedRecord>();
for (ReplicatedRecordStore store : stores) {
values.addAll(store.values(false));
}
Collection<Data> dataValues = new ArrayList<Data>(values.size());
SerializationService serializationService = getNodeEngine().getSerializationService();
for (ReplicatedRecord value : values) {
dataValues.add(serializationService.toData(value.getValue()));
}
response = new ReplicatedMapValueCollection(dataValues);
}
Aggregations