Examples of MapService


Examples of com.hazelcast.map.MapService

            throw new NullPointerException("Predicate should not be null!");
        }
        if (predicate instanceof PagingPredicate) {
            throw new NullPointerException("Paging is not supported for Transactional queries!");
        }
        final MapService service = getService();
        final QueryResultSet queryResultSet = (QueryResultSet) queryInternal(predicate, IterationType.KEY, false);
        final Set<Object> keySet = new HashSet<Object>(queryResultSet); //todo: Can't we just use the original set?

        for (final Map.Entry<Object, TxnValueWrapper> entry : txMap.entrySet()) {
            if (!TxnValueWrapper.Type.REMOVED.equals(entry.getValue().type)) {
                final Object value = entry.getValue().value instanceof Data ?
                        service.toObject(entry.getValue().value) : entry.getValue().value;
                final QueryEntry queryEntry = new QueryEntry(null, service.toData(entry.getKey()), entry.getKey(), value);
                // apply predicate on txMap.
                if (predicate.apply(queryEntry)) {
                    keySet.add(entry.getKey());
                }
            } else {
View Full Code Here

Examples of com.hazelcast.map.MapService

    @Override
    public Map<K, Object> executeOnKeys(Set<K> keys, EntryProcessor entryProcessor) {
        if (keys == null || keys.size() == 0) {
            throw new NullPointerException(NULL_KEY_IS_NOT_ALLOWED);
        }
        MapService service = getService();
        Set<Data> dataKeys = new HashSet<Data>(keys.size());
        for(K key : keys)
        {
            dataKeys.add(service.toData(key, partitionStrategy));
        }
        return executeOnKeysInternal(dataKeys, entryProcessor);
    }
View Full Code Here

Examples of com.hazelcast.map.impl.MapService

    @Override
    public boolean open(NodeEngine nodeEngine) {
        NodeEngineImpl nei = (NodeEngineImpl) nodeEngine;
        InternalPartitionService ps = nei.getPartitionService();
        MapService mapService = nei.getService(MapService.SERVICE_NAME);
        ss = nei.getSerializationService();
        Address partitionOwner = ps.getPartitionOwner(partitionId);
        if (partitionOwner == null) {
            return false;
        }
        RecordStore recordStore = mapService.getMapServiceContext().getRecordStore(partitionId, mapName);
        iterator = recordStore.entrySetData().iterator();
        return true;
    }
View Full Code Here

Examples of org.fusesource.restygwt.examples.client.MapService

    }

    private static final int REQUEST_TIMEOUT = 2000;

    public void testGet() {
        MapService service = GWT.create(MapService.class);
        Map<String, String> map = new LinkedHashMap<String, String>();
        map.put("hello", "world");
        map.put("another", "value");
        service.get(expectResult(new MapResult(map)));
        delayTestFinish(REQUEST_TIMEOUT);
    }
View Full Code Here

Examples of test.component3.MapService

  }

  @Test
  public void testMapInject() {
    MapService mapService = xmlApplicationContext.getBean("mapService");
    Map<Object, Object> map = mapService.getMap();
    // System.out.println("size ================================ "+map.size());
    for (Entry<Object, Object> entry : map.entrySet()) {
      log.info(entry.getKey() + "\t" + entry.getValue());
      if(entry.getKey().getClass().isArray()) {
        Object[] objects = (Object[])entry.getKey();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.