use of com.hazelcast.core.EntryView in project hazelcast by hazelcast.
the class ClientMapBasicTest method testGetEntryView_whenKeyAbsent.
@Test
public void testGetEntryView_whenKeyAbsent() {
IMap<String, String> map = client.getMap(randomString());
EntryView view = map.getEntryView("NOT_THERE");
assertEquals(null, view);
}
use of com.hazelcast.core.EntryView in project hazelcast by hazelcast.
the class SimpleEntryViewTest method test_toString.
@Test
public void test_toString() throws Exception {
HazelcastInstance instance = createHazelcastInstance();
IMap map = instance.getMap("test");
map.put(1, 1);
EntryView entryView = map.getEntryView(1);
assertEquals(stringify(entryView), entryView.toString());
}
use of com.hazelcast.core.EntryView in project hazelcast by hazelcast.
the class LazyEntryViewFromRecordTest method test_equals.
@Test
public void test_equals() throws Exception {
EntryView entryView = createDefaultEntryView();
assertTrue(view.equals(entryView) && entryView.equals(view));
}
use of com.hazelcast.core.EntryView in project hazelcast by hazelcast.
the class LazyEntryViewFromRecordTest method test_hashCode.
@Test
public void test_hashCode() throws Exception {
EntryView entryView = createDefaultEntryView();
assertEquals(entryView.hashCode(), view.hashCode());
}
use of com.hazelcast.core.EntryView in project hazelcast by hazelcast.
the class MapProxySupport method getEntryViewInternal.
protected EntryView getEntryViewInternal(Data key) {
int partitionId = partitionService.getPartitionId(key);
MapOperation operation = operationProvider.createGetEntryViewOperation(name, key);
operation.setThreadId(ThreadUtil.getThreadId());
operation.setServiceName(SERVICE_NAME);
try {
Future future = operationService.invokeOnPartition(SERVICE_NAME, operation, partitionId);
return (EntryView) toObject(future.get());
} catch (Throwable t) {
throw rethrow(t);
}
}
Aggregations