Package com.hazelcast.cache.impl

Examples of com.hazelcast.cache.impl.CacheService


    }

    @Override
    public void run()
            throws Exception {
        final CacheService service = getService();
        if (isStat) {
            service.setStatisticsEnabled(null, name, enabled);
        } else {
            service.setManagementEnabled(null, name, enabled);
        }
    }
View Full Code Here


    }

    @Override
    public void run()
            throws Exception {
        final CacheService service = getService();
        final CacheConfig cacheConfig = service.getCacheConfig(name);
        if (cacheConfig == null) {
            CacheSimpleConfig simpleConfig = service.findCacheConfig(simpleName);
            if (simpleConfig != null) {
                try {
                    CacheConfig cacheConfigFromSimpleConfig = new CacheConfig(simpleConfig);
                    cacheConfigFromSimpleConfig.setName(name);
                    cacheConfigFromSimpleConfig.setManagerPrefix(name.substring(0, name.lastIndexOf(simpleName)));
                    if (service.createCacheConfigIfAbsent(cacheConfigFromSimpleConfig, false) == null) {
                        response = cacheConfigFromSimpleConfig;
                        return;
                    }
                } catch (Exception e) {
                    //Cannot create the actual config from the declarative one
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 {
        final CacheService service = getService();
        service.destroyCache(name, isLocal, getCallerUuid());
    }
View Full Code Here

    public CacheGetAllOperation() {
    }

    public void run() {
        CacheService service = getService();
        ICacheRecordStore cache = service.getOrCreateCache(name, getPartitionId());

        int partitionId = getPartitionId();
        Set<Data> partitionKeySet = new HashSet<Data>();
        for (Data key : keys) {
            if (partitionId == getNodeEngine().getPartitionService().getPartitionId(key)) {
View Full Code Here

        super(name, registrationId);
    }

    public Object call()
            throws Exception {
        final CacheService service = getService();
        return service.deregisterListener(name, registrationId);
    }
View Full Code Here

    }

    @Override
    public Object call() {
        final ClientEndpoint endpoint = getEndpoint();
        final CacheService service = getService();
        CacheEventListener entryListener = new CacheEventListener() {
            @Override
            public void handleEvent(Object eventObject) {
                if (endpoint.isAlive()) {
                    endpoint.sendEvent(eventObject, getCallId());
                }
            }
        };
        return service.registerListener(name, entryListener);
    }
View Full Code Here

    @Override
    public <T> T createService(Class<T> clazz) {
        if (WanReplicationService.class.isAssignableFrom(clazz)) {
            return (T) new WanReplicationServiceImpl(node);
        } else if (ICacheService.class.isAssignableFrom(clazz)) {
            return (T) new CacheService();
        }
        throw new IllegalArgumentException("Unknown service class: " + clazz);
    }
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.