public class OCommandCacheHook extends ORecordHookAbstract
ORecordHook.DISTRIBUTED_EXECUTION_MODE, ORecordHook.HOOK_POSITION, ORecordHook.RESULT, ORecordHook.SCOPE, ORecordHook.TYPE
Constructor and Description |
---|
OCommandCacheHook(ODatabaseDocumentInternal iDatabase) |
Modifier and Type | Method and Description |
---|---|
ORecordHook.DISTRIBUTED_EXECUTION_MODE |
getDistributedExecutionMode() |
ORecordHook.SCOPE[] |
getScopes()
Returns the array of scopes this hook interested in.
|
protected void |
invalidateCache(ORecord iRecord) |
void |
onRecordAfterCreate(ORecord iRecord)
It's called just after the iRecord is created.
|
void |
onRecordAfterDelete(ORecord iRecord)
It's called just after the iRecord is deleted.
|
void |
onRecordAfterUpdate(ORecord iRecord)
It's called just after the iRecord is updated.
|
onRecordAfterRead, onRecordAfterReplicaAdd, onRecordAfterReplicaDelete, onRecordAfterReplicaUpdate, onRecordBeforeCreate, onRecordBeforeDelete, onRecordBeforeRead, onRecordBeforeReplicaAdd, onRecordBeforeReplicaDelete, onRecordBeforeReplicaUpdate, onRecordBeforeUpdate, onRecordCreateFailed, onRecordCreateReplicated, onRecordDeleteFailed, onRecordDeleteReplicated, onRecordFinalizeCreation, onRecordFinalizeDeletion, onRecordFinalizeUpdate, onRecordReadFailed, onRecordReadReplicated, onRecordReplicaAddFailed, onRecordReplicaDeleteFailed, onRecordReplicaUpdateFailed, onRecordUpdateFailed, onRecordUpdateReplicated, onTrigger, onUnregister
public OCommandCacheHook(ODatabaseDocumentInternal iDatabase)
public ORecordHook.SCOPE[] getScopes()
ORecordHook
Limiting the hook to proper scopes may give huge performance boost, especially if the hook's
ORecordHook.onTrigger(TYPE, ORecord)
dispatcher implementation is heavy. In extreme cases, you may
override the ORecordHook.onTrigger(TYPE, ORecord)
to act directly on event's ORecordHook.TYPE
and exit early, scopes are just a more handy alternative to this.
ORecordHook.SCOPE
public void onRecordAfterCreate(ORecord iRecord)
ORecordHookAbstract
onRecordAfterCreate
in class ORecordHookAbstract
iRecord
- The iRecord just createdpublic void onRecordAfterUpdate(ORecord iRecord)
ORecordHookAbstract
onRecordAfterUpdate
in class ORecordHookAbstract
iRecord
- The iRecord just updatedpublic void onRecordAfterDelete(ORecord iRecord)
ORecordHookAbstract
onRecordAfterDelete
in class ORecordHookAbstract
iRecord
- The iRecord just deletedprotected void invalidateCache(ORecord iRecord)
public ORecordHook.DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode()
Copyright © 2009–2020 OrientDB. All rights reserved.