Search in sources :

Example 1 with ResultSet

use of com.hazelcast.internal.util.ResultSet in project hazelcast by hazelcast.

the class ReplicatedMapProxy method entrySet.

@Nonnull
@Override
@SuppressWarnings("unchecked")
public Set<Entry<K, V>> entrySet() {
    ensureNoSplitBrain(READ);
    Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(getName());
    List<Entry> entries = new ArrayList<>();
    for (ReplicatedRecordStore store : stores) {
        entries.addAll(store.entrySet(true));
    }
    return (Set) new ResultSet(entries, IterationType.ENTRY);
}
Also used : ResultSet(com.hazelcast.internal.util.ResultSet) Set(java.util.Set) SetUtil.createHashSet(com.hazelcast.internal.util.SetUtil.createHashSet) BitSet(java.util.BitSet) ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ArrayList(java.util.ArrayList) ResultSet(com.hazelcast.internal.util.ResultSet) Nonnull(javax.annotation.Nonnull)

Aggregations

ResultSet (com.hazelcast.internal.util.ResultSet)1 SetUtil.createHashSet (com.hazelcast.internal.util.SetUtil.createHashSet)1 ReplicatedRecordStore (com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore)1 ArrayList (java.util.ArrayList)1 BitSet (java.util.BitSet)1 Set (java.util.Set)1 Nonnull (javax.annotation.Nonnull)1