Class AbstractEventListener
public class AbstractEventListener : JVMBridgeListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition
- Inheritance
-
AbstractEventListener
- Implements
- Derived
Constructors
AbstractEventListener(IJVMBridgeBaseInitializer)
Initializer used internally by JCOBridge. Do not use directly.
[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentifiable behaviors.")]
public AbstractEventListener(IJVMBridgeBaseInitializer initializer)
Parameters
initializerIJVMBridgeBaseInitializer
AbstractEventListener(params object[])
Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.
public AbstractEventListener(params object[] args)
Parameters
argsobject[]
Properties
BridgeClassName
Java class name to be instantiated
public override string BridgeClassName { get; }
Property Value
OnIsOwningHandle
public Func<bool> OnIsOwningHandle { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnIsOwningHandleDispose
Optional handler invoked after the event handler returns, to dispose the JVM object returned by this event.
public Action<bool> OnIsOwningHandleDispose { get; set; }
Property Value
Remarks
Set OnIsOwningHandleDispose when the event handler returns a JVM-backed object that is no longer needed after the call. The handler receives the return value and is responsible for calling Dispose() on it, releasing the underlying JVM global reference immediately instead of waiting for the .NET garbage collector to finalize it. If not set, the return value is not disposed automatically.
OnOnBackgroundError
public Action<BackgroundErrorReason, Status> OnOnBackgroundError { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnColumnFamilyHandleDeletionStarted
public Action<ColumnFamilyHandle> OnOnColumnFamilyHandleDeletionStarted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnCompactionBegin
public Action<RocksDB, CompactionJobInfo> OnOnCompactionBegin { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnCompactionCompleted
public Action<RocksDB, CompactionJobInfo> OnOnCompactionCompleted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnErrorRecoveryBegin
public Func<BackgroundErrorReason, Status, bool> OnOnErrorRecoveryBegin { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnErrorRecoveryBeginDispose
Optional handler invoked after the event handler returns, to dispose the JVM object returned by this event.
public Action<bool> OnOnErrorRecoveryBeginDispose { get; set; }
Property Value
Remarks
Set OnOnErrorRecoveryBeginDispose when the event handler returns a JVM-backed object that is no longer needed after the call. The handler receives the return value and is responsible for calling Dispose() on it, releasing the underlying JVM global reference immediately instead of waiting for the .NET garbage collector to finalize it. If not set, the return value is not disposed automatically.
OnOnErrorRecoveryCompleted
public Action<Status> OnOnErrorRecoveryCompleted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnExternalFileIngested
public Action<RocksDB, ExternalFileIngestionInfo> OnOnExternalFileIngested { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileCloseFinish
public Action<FileOperationInfo> OnOnFileCloseFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileFlushFinish
public Action<FileOperationInfo> OnOnFileFlushFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileRangeSyncFinish
public Action<FileOperationInfo> OnOnFileRangeSyncFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileReadFinish
public Action<FileOperationInfo> OnOnFileReadFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileSyncFinish
public Action<FileOperationInfo> OnOnFileSyncFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileTruncateFinish
public Action<FileOperationInfo> OnOnFileTruncateFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFileWriteFinish
public Action<FileOperationInfo> OnOnFileWriteFinish { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFlushBegin
public Action<RocksDB, FlushJobInfo> OnOnFlushBegin { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnFlushCompleted
public Action<RocksDB, FlushJobInfo> OnOnFlushCompleted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnMemTableSealed
public Action<MemTableInfo> OnOnMemTableSealed { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnStallConditionsChanged
public Action<WriteStallInfo> OnOnStallConditionsChanged { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnTableFileCreated
public Action<TableFileCreationInfo> OnOnTableFileCreated { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnTableFileCreationStarted
public Action<TableFileCreationBriefInfo> OnOnTableFileCreationStarted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnOnTableFileDeleted
public Action<TableFileDeletionInfo> OnOnTableFileDeleted { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnShouldBeNotifiedOnFileIO
public Func<bool> OnShouldBeNotifiedOnFileIO { get; set; }
Property Value
Remarks
Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.
OnShouldBeNotifiedOnFileIODispose
Optional handler invoked after the event handler returns, to dispose the JVM object returned by this event.
public Action<bool> OnShouldBeNotifiedOnFileIODispose { get; set; }
Property Value
Remarks
Set OnShouldBeNotifiedOnFileIODispose when the event handler returns a JVM-backed object that is no longer needed after the call. The handler receives the return value and is responsible for calling Dispose() on it, releasing the underlying JVM global reference immediately instead of waiting for the .NET garbage collector to finalize it. If not set, the return value is not disposed automatically.
Methods
InitializeHandlers(Type)
Handlers initializer for AbstractEventListener
protected virtual void InitializeHandlers(Type listenerRuntimeType)
Parameters
listenerRuntimeTypeType
IsOwningHandle()
public virtual bool IsOwningHandle()
Returns
ListenerShallManageEvent(int)
Invoked from the JVMBridgeListener on each received event to notify the user which can decide to abort the execution for the specific event returning false
protected override bool ListenerShallManageEvent(int eventIndex)
Parameters
eventIndexintThe index of the event triggered as returned from AddEventHandler(string, EventHandler) or AddEventHandler<TDataClass>(string, EventHandler<CLRListenerEventArgs<TDataClass>>)
Returns
Remarks
By default every event continues the execution and reads the data from JVM; this implies an extra cost which can be limited using ListenerShallManageEvent(int) or the ListenerShallManageEventIndex/ListenerShallManageEventName handlers. Returning false the control is immediately returned to the JVM, anyway the user has received the notification. It can be useful in scenarios where the user is interested in few events and the other are simply discarded to optimize the execution speed. By default, this function invokes ListenerShallManageEventIndex, then try ListenerShallManageEventName if they are set or return true
ListenerShallManageEventHandlers(int)
protected virtual bool ListenerShallManageEventHandlers(int eventIndex)
Parameters
eventIndexint
Returns
OnBackgroundError(BackgroundErrorReason, Status)
public virtual void OnBackgroundError(BackgroundErrorReason arg0, Status arg1)
Parameters
OnColumnFamilyHandleDeletionStarted(ColumnFamilyHandle)
public virtual void OnColumnFamilyHandleDeletionStarted(ColumnFamilyHandle arg0)
Parameters
OnCompactionBegin(RocksDB, CompactionJobInfo)
public virtual void OnCompactionBegin(RocksDB arg0, CompactionJobInfo arg1)
Parameters
arg0RocksDBarg1CompactionJobInfo
OnCompactionCompleted(RocksDB, CompactionJobInfo)
public virtual void OnCompactionCompleted(RocksDB arg0, CompactionJobInfo arg1)
Parameters
arg0RocksDBarg1CompactionJobInfo
OnErrorRecoveryBegin(BackgroundErrorReason, Status)
public virtual bool OnErrorRecoveryBegin(BackgroundErrorReason arg0, Status arg1)
Parameters
Returns
OnErrorRecoveryCompleted(Status)
public virtual void OnErrorRecoveryCompleted(Status arg0)
Parameters
OnExternalFileIngested(RocksDB, ExternalFileIngestionInfo)
public virtual void OnExternalFileIngested(RocksDB arg0, ExternalFileIngestionInfo arg1)
Parameters
OnFileCloseFinish(FileOperationInfo)
public virtual void OnFileCloseFinish(FileOperationInfo arg0)
Parameters
OnFileFlushFinish(FileOperationInfo)
public virtual void OnFileFlushFinish(FileOperationInfo arg0)
Parameters
OnFileRangeSyncFinish(FileOperationInfo)
public virtual void OnFileRangeSyncFinish(FileOperationInfo arg0)
Parameters
OnFileReadFinish(FileOperationInfo)
public virtual void OnFileReadFinish(FileOperationInfo arg0)
Parameters
OnFileSyncFinish(FileOperationInfo)
public virtual void OnFileSyncFinish(FileOperationInfo arg0)
Parameters
OnFileTruncateFinish(FileOperationInfo)
public virtual void OnFileTruncateFinish(FileOperationInfo arg0)
Parameters
OnFileWriteFinish(FileOperationInfo)
public virtual void OnFileWriteFinish(FileOperationInfo arg0)
Parameters
OnFlushBegin(RocksDB, FlushJobInfo)
public virtual void OnFlushBegin(RocksDB arg0, FlushJobInfo arg1)
Parameters
arg0RocksDBarg1FlushJobInfo
OnFlushCompleted(RocksDB, FlushJobInfo)
public virtual void OnFlushCompleted(RocksDB arg0, FlushJobInfo arg1)
Parameters
arg0RocksDBarg1FlushJobInfo
OnMemTableSealed(MemTableInfo)
public virtual void OnMemTableSealed(MemTableInfo arg0)
Parameters
arg0MemTableInfo
OnStallConditionsChanged(WriteStallInfo)
public virtual void OnStallConditionsChanged(WriteStallInfo arg0)
Parameters
OnTableFileCreated(TableFileCreationInfo)
public virtual void OnTableFileCreated(TableFileCreationInfo arg0)
Parameters
OnTableFileCreationStarted(TableFileCreationBriefInfo)
public virtual void OnTableFileCreationStarted(TableFileCreationBriefInfo arg0)
Parameters
OnTableFileDeleted(TableFileDeletionInfo)
public virtual void OnTableFileDeleted(TableFileDeletionInfo arg0)
Parameters
ShouldBeNotifiedOnFileIO()
public virtual bool ShouldBeNotifiedOnFileIO()