Package com.hazelcast.map.impl

Examples of com.hazelcast.map.impl.MapKeySet


        MapService service = getService();
        for (Object o : map.values()) {
            Set keys = ((MapKeySet) service.getMapServiceContext().toObject(o)).getKeySet();
            res.addAll(keys);
        }
        return new MapKeySet(res);
    }
View Full Code Here


        }
    }

    @Override
    public Object getResponse() {
        return new MapKeySet(keySet);
    }
View Full Code Here

    }

    public Set<K> keySet() {
        final TxnMapRequest request = new TxnMapRequest(getName(),
                TxnMapRequest.TxnMapRequestType.KEYSET);
        final MapKeySet result = invoke(request);
        final Set<Data> dataKeySet = result.getKeySet();
        final HashSet<K> keySet = new HashSet<K>(dataKeySet.size());
        for (Data data : dataKeySet) {
            keySet.add((K) toObject(data));
        }
        return keySet;
View Full Code Here

        if (predicate == null) {
            throw new NullPointerException("Predicate should not be null!");
        }
        final TxnMapRequest request = new TxnMapRequest(getName(),
                TxnMapRequest.TxnMapRequestType.KEYSET_BY_PREDICATE, predicate);
        final MapKeySet result = invoke(request);
        final Set<Data> dataKeySet = result.getKeySet();
        final HashSet<K> keySet = new HashSet<K>(dataKeySet.size());
        for (Data data : dataKeySet) {
            keySet.add((K) toObject(data));
        }
        return keySet;
View Full Code Here

            map.put(i, "v" + i);
            testSet.add(i);
        }
        final SimpleClient client = getClient();
        client.send(new MapKeySetRequest(mapName));
        MapKeySet keyset = (MapKeySet) client.receive();
        for (Data o : keyset.getKeySet()) {
            Object x = TestUtil.toObject(o);
            assertTrue(testSet.remove(x));
        }
        assertEquals(0, testSet.size());
    }
View Full Code Here

    public NearCacheKeySetInvalidationOperation() {
    }

    public NearCacheKeySetInvalidationOperation(String mapName, Set<Data> keys) {
        this.mapKeySet = new MapKeySet(keys);
        this.mapName = mapName;
    }
View Full Code Here

    @Override
    public void readInternal(ObjectDataInput in) throws IOException {
        super.readInternal(in);
        mapName = in.readUTF();
        mapKeySet = new MapKeySet();
        mapKeySet.readData(in);
    }
View Full Code Here

    }

    @Override
    public Set<K> keySet() {
        MapKeySetRequest request = new MapKeySetRequest(name);
        MapKeySet mapKeySet = invoke(request);
        Set<Data> keySetData = mapKeySet.getKeySet();
        Set<K> keySet = new HashSet<K>(keySetData.size());
        for (Data data : keySetData) {
            final K key = toObject(data);
            keySet.add(key);
        }
View Full Code Here

        final HashSet<Data> dataKeySet = new HashSet<Data>();
        for (Object key : keySet) {
            final Data dataKey = serializationService.toData(key);
            dataKeySet.add(dataKey);
        }
        return new MapKeySet(dataKeySet);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.map.impl.MapKeySet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.