
public class OLiveQueryHook extends ODocumentHookAbstract implements ORecordHook.Scoped, ODatabaseListener
| Modifier and Type | Class and Description |
|---|---|
static class |
OLiveQueryHook.OLiveQueryOps |
ORecordHook.DISTRIBUTED_EXECUTION_MODE, ORecordHook.HOOK_POSITION, ORecordHook.RESULT, ORecordHook.SCOPE, ORecordHook.Scoped, ORecordHook.TYPEdatabase| Constructor and Description |
|---|
OLiveQueryHook(ODatabaseDocumentInternal db) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addOp(ODocument iDocument,
byte iType) |
ORecordHook.DISTRIBUTED_EXECUTION_MODE |
getDistributedExecutionMode() |
static OLiveQueryHook.OLiveQueryOps |
getOpsReference(ODatabaseInternal db) |
ORecordHook.SCOPE[] |
getScopes()
Returns the array of scopes this hook interested in.
|
void |
onAfterCommand(OCommandRequestText iCommand,
OCommandExecutor executor,
Object result) |
void |
onAfterTxCommit(ODatabase iDatabase) |
void |
onAfterTxRollback(ODatabase iDatabase) |
void |
onBeforeCommand(OCommandRequestText iCommand,
OCommandExecutor executor) |
void |
onBeforeTxBegin(ODatabase iDatabase) |
void |
onBeforeTxCommit(ODatabase iDatabase) |
void |
onBeforeTxRollback(ODatabase iDatabase) |
void |
onClose(ODatabase iDatabase) |
boolean |
onCorruptionRepairDatabase(ODatabase iDatabase,
String iReason,
String iWhatWillbeFixed)
Callback to decide if repair the database upon corruption.
|
void |
onCreate(ODatabase iDatabase) |
void |
onDelete(ODatabase iDatabase) |
void |
onOpen(ODatabase iDatabase) |
void |
onRecordAfterCreate(ODocument iDocument)
It's called just after the document is created.
|
void |
onRecordAfterUpdate(ODocument iDocument)
It's called just after the document is updated.
|
ORecordHook.RESULT |
onRecordBeforeDelete(ODocument iDocument)
It's called just before to delete the document.
|
static Integer |
subscribe(Integer token,
OLiveQueryListener iListener,
ODatabaseInternal db) |
static void |
unsubscribe(Integer id,
ODatabaseInternal db) |
filterBySchemaClass, getExcludeClasses, getIncludeClasses, onRecordAfterDelete, onRecordAfterRead, onRecordBeforeCreate, onRecordBeforeRead, onRecordBeforeUpdate, onRecordCreateFailed, onRecordCreateReplicated, onRecordDeleteFailed, onRecordDeleteReplicated, onRecordFinalizeCreation, onRecordFinalizeDeletion, onRecordFinalizeUpdate, onRecordReadFailed, onRecordReadReplicated, onRecordUpdateFailed, onRecordUpdateReplicated, onTrigger, onUnregister, setExcludeClasses, setIncludeClassesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonTrigger, onUnregisterpublic OLiveQueryHook(ODatabaseDocumentInternal db)
public ORecordHook.SCOPE[] getScopes()
ORecordHook.ScopedReturns 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
ORecordHook.onTrigger(TYPE, ORecord) dispatcher implementation is heavy. In extreme cases, you may override the ORecordHook.onTrigger(TYPE, ORecord) to act directly on event ORecordHook.TYPE and exit early, scopes are just a more handy
alternative to this.
getScopes in interface ORecordHook.ScopedORecordHook.SCOPEpublic static OLiveQueryHook.OLiveQueryOps getOpsReference(ODatabaseInternal db)
public static Integer subscribe(Integer token, OLiveQueryListener iListener, ODatabaseInternal db)
public static void unsubscribe(Integer id, ODatabaseInternal db)
public void onCreate(ODatabase iDatabase)
onCreate in interface ODatabaseListenerpublic void onDelete(ODatabase iDatabase)
onDelete in interface ODatabaseListenerpublic void onOpen(ODatabase iDatabase)
onOpen in interface ODatabaseListenerpublic void onBeforeTxBegin(ODatabase iDatabase)
onBeforeTxBegin in interface ODatabaseListenerpublic void onBeforeTxRollback(ODatabase iDatabase)
onBeforeTxRollback in interface ODatabaseListenerpublic void onAfterTxRollback(ODatabase iDatabase)
onAfterTxRollback in interface ODatabaseListenerpublic void onBeforeTxCommit(ODatabase iDatabase)
onBeforeTxCommit in interface ODatabaseListenerpublic void onAfterTxCommit(ODatabase iDatabase)
onAfterTxCommit in interface ODatabaseListenerpublic void onClose(ODatabase iDatabase)
onClose in interface ODatabaseListenerpublic void onBeforeCommand(OCommandRequestText iCommand, OCommandExecutor executor)
onBeforeCommand in interface ODatabaseListenerpublic void onAfterCommand(OCommandRequestText iCommand, OCommandExecutor executor, Object result)
onAfterCommand in interface ODatabaseListenerpublic void onRecordAfterCreate(ODocument iDocument)
ODocumentHookAbstractonRecordAfterCreate in class ODocumentHookAbstractiDocument - The document is going to be createdpublic void onRecordAfterUpdate(ODocument iDocument)
ODocumentHookAbstractonRecordAfterUpdate in class ODocumentHookAbstractiDocument - The document just updatedpublic ORecordHook.RESULT onRecordBeforeDelete(ODocument iDocument)
ODocumentHookAbstractonRecordBeforeDelete in class ODocumentHookAbstractiDocument - The document to deleteprotected void addOp(ODocument iDocument, byte iType)
public boolean onCorruptionRepairDatabase(ODatabase iDatabase, String iReason, String iWhatWillbeFixed)
ODatabaseListeneronCorruptionRepairDatabase in interface ODatabaseListeneriDatabase - Target databaseiReason - Reason of corruptioniWhatWillbeFixed - TODOpublic ORecordHook.DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode()
getDistributedExecutionMode in interface ORecordHookCopyright © 2009–2025 OrientDB. All rights reserved.