Class EventListenerDirect
Concrete CLR representation of EventListener returned by the JVM.
public class EventListenerDirect : EventListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBaseInstance>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeBaseInstance, IJVMBridgeDefinition, IEventListener
- Inheritance
-
EventListenerDirect
- Implements
- Inherited Members
Remarks
When the JVM returns an instance of this listener type, JCOBridge needs a concrete CLR class to wrap it. A full listener implementation cannot be used in this scenario because it would require user-provided handler code that is not available at the point of construction. This class provides a minimal, handler-free wrapper: InitializeHandlers(Type) is a no-op, ListenerShallManageEvent(int) unconditionally returns false discarding all events immediately, and AutoInit is false to prevent automatic JVM-side registration.
Do not use this class directly to register event handlers — use EventListener instead.
Constructors
EventListenerDirect(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 EventListenerDirect(IJVMBridgeBaseInitializer initializer)
Parameters
initializerIJVMBridgeBaseInitializer
EventListenerDirect(params object[])
Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.
public EventListenerDirect(params object[] args)
Parameters
argsobject[]
Properties
AutoInit
Set to false to externally initialize this JVMBridgeListener instance using InitializeListener(IJVMBridgeBase)
public override bool AutoInit { get; }
Property Value
BridgeClassName
Java class name to be instantiated
public override string BridgeClassName { get; }
Property Value
IsBridgeAbstract
true if the BridgeClassName is an abstract class, i.e. cannot be created an instance
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
true if the BridgeClassName implements java.lang.AutoCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
true if the BridgeClassName is an interface, i.e. does not have any public constructor
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
true if the BridgeClassName is a static class, i.e. does not have any public constructor
public override bool IsBridgeStatic { get; }
Property Value
Methods
InitializeHandlers(Type)
Handlers initializer for EventListener
protected override void InitializeHandlers(Type _)
Parameters
_Type
Remarks
No handlers are registered in this direct override — initialization is intentionally skipped.
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 _)
Parameters
_int
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
OnBackgroundError(BackgroundErrorReason, Status)
public override void OnBackgroundError(BackgroundErrorReason arg0, Status arg1)
Parameters
OnColumnFamilyHandleDeletionStarted(ColumnFamilyHandle)
public override void OnColumnFamilyHandleDeletionStarted(ColumnFamilyHandle arg0)
Parameters
OnCompactionBegin(RocksDB, CompactionJobInfo)
public override void OnCompactionBegin(RocksDB arg0, CompactionJobInfo arg1)
Parameters
arg0RocksDBarg1CompactionJobInfo
OnCompactionCompleted(RocksDB, CompactionJobInfo)
public override void OnCompactionCompleted(RocksDB arg0, CompactionJobInfo arg1)
Parameters
arg0RocksDBarg1CompactionJobInfo
OnErrorRecoveryBegin(BackgroundErrorReason, Status)
public override bool OnErrorRecoveryBegin(BackgroundErrorReason arg0, Status arg1)
Parameters
Returns
OnErrorRecoveryCompleted(Status)
public override void OnErrorRecoveryCompleted(Status arg0)
Parameters
OnExternalFileIngested(RocksDB, ExternalFileIngestionInfo)
public override void OnExternalFileIngested(RocksDB arg0, ExternalFileIngestionInfo arg1)
Parameters
OnFileCloseFinish(FileOperationInfo)
public override void OnFileCloseFinish(FileOperationInfo arg0)
Parameters
OnFileFlushFinish(FileOperationInfo)
public override void OnFileFlushFinish(FileOperationInfo arg0)
Parameters
OnFileRangeSyncFinish(FileOperationInfo)
public override void OnFileRangeSyncFinish(FileOperationInfo arg0)
Parameters
OnFileReadFinish(FileOperationInfo)
public override void OnFileReadFinish(FileOperationInfo arg0)
Parameters
OnFileSyncFinish(FileOperationInfo)
public override void OnFileSyncFinish(FileOperationInfo arg0)
Parameters
OnFileTruncateFinish(FileOperationInfo)
public override void OnFileTruncateFinish(FileOperationInfo arg0)
Parameters
OnFileWriteFinish(FileOperationInfo)
public override void OnFileWriteFinish(FileOperationInfo arg0)
Parameters
OnFlushBegin(RocksDB, FlushJobInfo)
public override void OnFlushBegin(RocksDB arg0, FlushJobInfo arg1)
Parameters
arg0RocksDBarg1FlushJobInfo
OnFlushCompleted(RocksDB, FlushJobInfo)
public override void OnFlushCompleted(RocksDB arg0, FlushJobInfo arg1)
Parameters
arg0RocksDBarg1FlushJobInfo
OnMemTableSealed(MemTableInfo)
public override void OnMemTableSealed(MemTableInfo arg0)
Parameters
arg0MemTableInfo
OnStallConditionsChanged(WriteStallInfo)
public override void OnStallConditionsChanged(WriteStallInfo arg0)
Parameters
OnTableFileCreated(TableFileCreationInfo)
public override void OnTableFileCreated(TableFileCreationInfo arg0)
Parameters
OnTableFileCreationStarted(TableFileCreationBriefInfo)
public override void OnTableFileCreationStarted(TableFileCreationBriefInfo arg0)
Parameters
OnTableFileDeleted(TableFileDeletionInfo)
public override void OnTableFileDeleted(TableFileDeletionInfo arg0)
Parameters
ShouldBeNotifiedOnFileIO()
public override bool ShouldBeNotifiedOnFileIO()