memoryscope.core.storage.base_monitor

class memoryscope.core.storage.base_monitor.BaseMonitor(**kwargs)[源代码]

基类:object

An abstract base class defining the interface for monitor classes. Subclasses should implement the methods defined here to provide concrete monitoring behavior.

__init__(**kwargs)[源代码]
abstract add()[源代码]

Abstract method to add data or events to the monitor. This method should be implemented by subclasses to define how data is added into the monitoring system.

返回:

None

abstract add_token()[源代码]

Abstract method to add a token or a specific type of identifier to the monitor. Subclasses should implement this to specify how tokens are managed within the monitoring context.

返回:

None

flush()[源代码]

Method to flush any buffered data in the monitor. Intended to ensure that all pending recorded data is processed or written out.

返回:

None

close()[源代码]

Method to close the monitor, performing necessary cleanup operations. This could include releasing resources, closing files, or any other termination tasks.

返回:

None