use of com.hazelcast.internal.adapter.IMapDataStructureAdapter in project hazelcast by hazelcast.
the class ClientMapNearCacheBasicTest method createContext.
@Override
protected <K, V> NearCacheTestContext<K, V, Data, String> createContext(boolean loaderEnabled) {
IMapMapStore mapStore = loaderEnabled ? new IMapMapStore() : null;
Config config = getConfig();
addMapStoreConfig(mapStore, config.getMapConfig(DEFAULT_NEAR_CACHE_NAME));
HazelcastInstance member = hazelcastFactory.newHazelcastInstance(config);
IMap<K, V> memberMap = member.getMap(DEFAULT_NEAR_CACHE_NAME);
IMapDataStructureAdapter<K, V> dataAdapter = new IMapDataStructureAdapter<K, V>(memberMap);
// wait until the initial load is done
dataAdapter.waitUntilLoaded();
NearCacheTestContextBuilder<K, V, Data, String> builder = createNearCacheContextBuilder();
return builder.setDataInstance(member).setDataAdapter(dataAdapter).setLoader(mapStore).build();
}
use of com.hazelcast.internal.adapter.IMapDataStructureAdapter in project hazelcast by hazelcast.
the class LiteMemberMapNearCacheBasicTest method createContext.
@Override
protected <K, V> NearCacheTestContext<K, V, Data, String> createContext(boolean loaderEnabled) {
IMapMapStore mapStore = loaderEnabled ? new IMapMapStore() : null;
Config config = getConfig(mapStore, false);
HazelcastInstance member = hazelcastFactory.newHazelcastInstance(config);
IMap<K, V> memberMap = member.getMap(DEFAULT_NEAR_CACHE_NAME);
IMapDataStructureAdapter<K, V> dataAdapter = new IMapDataStructureAdapter<K, V>(memberMap);
// wait until the initial load is done
dataAdapter.waitUntilLoaded();
NearCacheTestContextBuilder<K, V, Data, String> builder = createNearCacheContextBuilder(mapStore);
return builder.setDataInstance(member).setDataAdapter(dataAdapter).build();
}
use of com.hazelcast.internal.adapter.IMapDataStructureAdapter in project hazelcast by hazelcast.
the class LiteMemberMapNearCacheSerializationCountTest method createContext.
@Override
protected <K, V> NearCacheTestContext<K, V, Data, String> createContext() {
HazelcastInstance member = hazelcastFactory.newHazelcastInstance(createConfig(nearCacheConfig, false));
IMap<K, V> memberMap = member.getMap(DEFAULT_NEAR_CACHE_NAME);
NearCacheTestContextBuilder<K, V, Data, String> builder = createNearCacheContextBuilder();
return builder.setDataInstance(member).setDataAdapter(new IMapDataStructureAdapter<K, V>(memberMap)).build();
}
use of com.hazelcast.internal.adapter.IMapDataStructureAdapter in project hazelcast by hazelcast.
the class LiteMemberMapNearCacheLeakTest method createContext.
@Override
protected <K, V> NearCacheTestContext<K, V, Data, String> createContext() {
Config config = getConfig(false);
HazelcastInstance member = hazelcastFactory.newHazelcastInstance(config);
IMap<K, V> memberMap = member.getMap(DEFAULT_NEAR_CACHE_NAME);
IMapDataStructureAdapter<K, V> dataAdapter = new IMapDataStructureAdapter<K, V>(memberMap);
// wait until the initial load is done
dataAdapter.waitUntilLoaded();
NearCacheTestContextBuilder<K, V, Data, String> builder = createNearCacheContextBuilder();
return builder.setDataInstance(member).setDataAdapter(dataAdapter).build();
}
use of com.hazelcast.internal.adapter.IMapDataStructureAdapter in project hazelcast by hazelcast.
the class MapNearCacheLeakTest method createContext.
@Override
protected <K, V> NearCacheTestContext<K, V, Data, String> createContext() {
Config config = getConfig(false);
HazelcastInstance dataInstance = hazelcastFactory.newHazelcastInstance(config);
IMap<K, V> dataMap = dataInstance.getMap(DEFAULT_NEAR_CACHE_NAME);
IMapDataStructureAdapter<K, V> dataAdapter = new IMapDataStructureAdapter<K, V>(dataMap);
// wait until the initial load is done
dataAdapter.waitUntilLoaded();
NearCacheTestContextBuilder<K, V, Data, String> builder = createNearCacheContextBuilder();
return builder.setDataInstance(dataInstance).setDataAdapter(dataAdapter).build();
}
Aggregations