use of com.hazelcast.client.impl.clientside.HazelcastClientProxy in project hazelcast by hazelcast.
the class ClientMapNearCachePreloaderTest method createNearCacheContextBuilder.
private <K, V> NearCacheTestContextBuilder<K, V, Data, String> createNearCacheContextBuilder() {
ClientConfig clientConfig = getClientConfig().addNearCacheConfig(nearCacheConfig);
HazelcastClientProxy client = (HazelcastClientProxy) hazelcastFactory.newHazelcastClient(clientConfig);
IMap<K, V> clientMap = client.getMap(nearCacheConfig.getName());
NearCacheManager nearCacheManager = ((ClientMapProxy) clientMap).getContext().getNearCacheManager(clientMap.getServiceName());
NearCache<Data, String> nearCache = nearCacheManager.getNearCache(nearCacheConfig.getName());
return new NearCacheTestContextBuilder<K, V, Data, String>(nearCacheConfig, client.getSerializationService()).setNearCacheInstance(client).setNearCacheAdapter(new IMapDataStructureAdapter<K, V>(clientMap)).setNearCache(nearCache).setNearCacheManager(nearCacheManager);
}
use of com.hazelcast.client.impl.clientside.HazelcastClientProxy in project hazelcast by hazelcast.
the class TestDisabledSpringAwareAnnotation method testDisabledSpringManagedContext.
@Test
public void testDisabledSpringManagedContext() {
HazelcastInstance instance = (HazelcastInstance) context.getBean("instance");
assertNull(instance.getConfig().getManagedContext());
HazelcastClientProxy client = (HazelcastClientProxy) context.getBean("client");
assertNull(client.getClientConfig().getManagedContext());
}
Aggregations