public class StartCacheCallable<K, V> implements DistributedCallable<K, V, Void>, Serializable { private static final long serialVersionUID = 8331682008912636780L; private final String cacheName; private transient Cache<K, V> cache; public StartCacheCallable(String cacheName) { this.cacheName = cacheName; } @Override public Void call() throws Exception { cache.getCacheManager().getCache(cacheName); // start the cache return null; } @Override public void setEnvironment(Cache<K, V> cache, Set<K> inputKeys) { this.cache = cache; } }