use of org.infinispan.client.hotrod.event.EventLogListener.RawStaticFilteredEventLogListener in project infinispan by infinispan.
the class ComplexValue method testRawFilteredListeners.
@Test
public void testRawFilteredListeners() {
remoteCache.clear();
RemoteCache<Object, Object> jsonCache = this.remoteCache.withDataFormat(DataFormat.builder().keyType(APPLICATION_JSON).keyMarshaller(new UTF8StringMarshaller()).build());
RawStaticFilteredEventLogListener<Object> l = new RawStaticFilteredEventLogListener<>(jsonCache);
withClientListener(l, remote -> {
jsonCache.put("{\"_type\":\"int32\",\"_value\":1}", Util.threadLocalRandomUUID().toString());
l.expectNoEvents();
jsonCache.put("{\"_type\":\"int32\",\"_value\":2}", Util.threadLocalRandomUUID().toString());
l.expectOnlyCreatedEvent("\n{\n \"_type\": \"int32\",\n \"_value\": 2\n}\n");
});
}
Aggregations