// HazelcastCacheManager cacheManager = new HazelcastCacheManager(hcp,instance,hcp.getDefaultURI(),hcp.getDefaultClassLoader(),null);
final CachingProvider cachingProvider = HazelcastServerCachingProvider.createCachingProvider(instance);
// final CachingProvider cachingProvider = Caching.getCachingProvider();
final CacheManager cacheManager = cachingProvider.getCacheManager();
CacheConfig<String, Object> config = new CacheConfig<String, Object>();
config.setTypes(String.class, Object.class);
config.setStatisticsEnabled(true);
cacheManager.createCache(NAMESPACE, config);
// final IMap<String, Object> map = instance.getMap(NAMESPACE);
for (int i = 0; i < threadCount; i++) {
es.execute(new Runnable() {
public void run() {
try {
while (true) {
final Cache<String, Object> cache = cacheManager.getCache(NAMESPACE,String.class, Object.class);
int key = (int) (random.nextFloat() * entryCount);
int operation = ((int) (random.nextFloat() * 100));
if (operation < getPercentage) {
cache.get(String.valueOf(key));
stats.gets.incrementAndGet();