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:
  • Method Details

    • onUnregister

      void onUnregister()
    • onTrigger

      ORecordHook.RESULT onTrigger(ORecordHook.TYPE iType, ORecord iRecord)
    • getDistributedExecutionMode

      ORecordHook.DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode()
    • getScopes

      default ORecordHook.SCOPE[] 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 the onTrigger(TYPE, ORecord) to act directly on event's ORecordHook.TYPE and exit early, scopes are just a more handy alternative to this.

      Returns:
      the scopes of this hook.
      See Also: