Java Code Examples for com.orientechnologies.orient.core.db.ODatabase#unregisterListener()
The following examples show how to use
com.orientechnologies.orient.core.db.ODatabase#unregisterListener() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntityHook.java From nexus-public with Eclipse Public License 1.0 | 5 votes |
/** * Unregisters {@link OLiveQueryHook} from the opened DB to reduce overhead as we don't use this feature. */ private void unregisterLiveQueryHook(final ODatabase db) { Optional<OLiveQueryHook> liveQueryHook = db.getHooks().keySet().stream() .filter(hook -> hook instanceof OLiveQueryHook) .findFirst(); if (liveQueryHook.isPresent()) { log.debug("Unregistering OLiveQueryHook"); db.unregisterListener(liveQueryHook.get()); db.unregisterHook(liveQueryHook.get()); } }
Example 2
Source File: EntityHook.java From nexus-public with Eclipse Public License 1.0 | 4 votes |
private void stopRecording(final ODatabase db) { db.unregisterHook(this); db.unregisterListener(this); }