Interface ORecordHook
- All Known Implementing Classes:
OAuditingHook,ODocumentHookAbstract,ORecordHookAbstract
public interface ORecordHook
Hook interface to catch all events regarding records.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com) – initial contribution, Sergey Sitnikov – scoped hooks
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enumstatic enumDefines available scopes for scoped hooks.static enum -
Method Summary
Modifier and TypeMethodDescriptiondefault ORecordHook.SCOPE[]Returns the array of scopes this hook interested in.onTrigger(ORecordHook.TYPE iType, ORecord iRecord) void
-
Method Details
-
onUnregister
void onUnregister() -
onTrigger
-
getDistributedExecutionMode
ORecordHook.DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode() -
getScopes
Returns the array of scopes this hook interested in. By default, all available scopes are returned, implement/override this method to limit the scopes this hook may participate to lower the number of useless invocations of this hook.Limiting the hook to proper scopes may give huge performance boost, especially if the hook's
onTrigger(TYPE, ORecord)dispatcher implementation is heavy. In extreme cases, you may override theonTrigger(TYPE, ORecord)to act directly on event'sORecordHook.TYPEand exit early, scopes are just a more handy alternative to this.- Returns:
- the scopes of this hook.
- See Also:
-