protected void registerListeners() {
if (!manager.getLogLogicConfiguration().isCheckNotifications()) {
return;
}
CacheListeners listeners = manager.getListeners();
if (listeners == null) {
throw new IllegalArgumentException("Service does not support cache listeners");
}
Collection<CacheListeners.Type> supported = listeners.getSupportedListeners();
if (!supported.containsAll(Arrays.asList(CacheListeners.Type.CREATED, CacheListeners.Type.UPDATED))) {
throw new IllegalArgumentException("Service does not support required listener types; supported are: " + supported);
}
String cacheName = manager.getGeneralConfiguration().getCacheName();
manager.getListeners().addCreatedListener(cacheName, this);