Package com.hazelcast.cache.impl

Examples of com.hazelcast.cache.impl.CacheService


    }

    @Override
    public void run()
            throws Exception {
        final CacheService service = getService();
        CacheConfig cacheConfig = service.getCacheConfig(name);
        if (register) {
            //REGISTER
            if (cacheConfig == null) {
                throw new IllegalStateException("CacheConfig does not exist!!! name: " + name);
            }
View Full Code Here


    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        int total = 0;
        CacheService cacheService = getService();
        for (Object result : map.values()) {
            Integer size = (Integer) cacheService.toObject(result);
            total += size;
        }
        return total;
    }
View Full Code Here

    }

    @Override
    public void run()
            throws Exception {
        CacheService service = getService();
        ICacheRecordStore cache = service.getOrCreateCache(name, getPartitionId());
        cache.setRecord(key, cacheRecord);
        response = Boolean.TRUE;
    }
View Full Code Here

    }

    @Override
    public void beforeRun()
            throws Exception {
        CacheService service = getService();
        cache = service.getOrCreateCache(name, getPartitionId());
    }
View Full Code Here

    }

    @Override
    public void beforeRun() throws Exception {
        //        //migrate CacheConfigs first
        CacheService service = getService();
        for (CacheConfig config : configs) {
            service.createCacheConfigIfAbsent(config, true);
        }
    }
View Full Code Here

    }

    @Override
    public void run()
            throws Exception {
        CacheService service = getService();
        for (Map.Entry<String, Map<Data, CacheRecord>> entry : data.entrySet()) {
            ICacheRecordStore cache = service.getOrCreateCache(entry.getKey(), getPartitionId());
            Map<Data, CacheRecord> map = entry.getValue();

            Iterator<Map.Entry<Data, CacheRecord>> iter = map.entrySet().iterator();
            while (iter.hasNext()) {
                Map.Entry<Data, CacheRecord> next = iter.next();
View Full Code Here

    }

    @Override
    public void beforeRun()
            throws Exception {
        CacheService service = getService();
        cache = service.getOrCreateCache(name, getPartitionId());
    }
View Full Code Here

    }

    @Override
    public void run()
            throws Exception {
        CacheService service = getService();
        ICacheRecordStore cache = service.getCacheRecordStore(name, getPartitionId());
        response = cache != null ? cache.size() : 0;
    }
View Full Code Here

        }
        if (filteredKeys.isEmpty()) {
            return;
        }
        try {
            final CacheService service = getService();
            cache = service.getOrCreateCache(name, partitionId);
            final Set<Data> keysLoaded = cache.loadAll(filteredKeys, replaceExistingValues);
            shouldBackup = !keysLoaded.isEmpty();
            if (shouldBackup) {
                backupRecords = new HashMap<Data, CacheRecord>();
                for (Data key : keysLoaded) {
View Full Code Here

    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        MapEntrySet resultSet = new MapEntrySet();
        CacheService service = getService();
        for (Map.Entry<Integer, Object> entry : map.entrySet()) {
            MapEntrySet mapEntrySet = (MapEntrySet) service.toObject(entry.getValue());
            Set<Map.Entry<Data, Data>> entrySet = mapEntrySet.getEntrySet();
            for (Map.Entry<Data, Data> dataEntry : entrySet) {
                resultSet.add(dataEntry);
            }
        }
View Full Code Here

TOP

Related Classes of com.hazelcast.cache.impl.CacheService

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.