Package kieker.analysis.plugin.reader
Class AbstractStringRegistryReaderPlugin
java.lang.Object
kieker.analysis.analysisComponent.AbstractAnalysisComponent
kieker.analysis.plugin.AbstractPlugin
kieker.analysis.plugin.reader.AbstractReaderPlugin
kieker.analysis.plugin.reader.AbstractStringRegistryReaderPlugin
- All Implemented Interfaces:
IAnalysisComponent,IPlugin,IReaderPlugin
- Direct Known Subclasses:
AmqpReader
@Deprecated public abstract class AbstractStringRegistryReaderPlugin extends AbstractReaderPlugin
Deprecated.
since 1.15.1 old plugin api
This class should be used as the abstract super class for all readers which make
use of string registries to reduce the amount of transferred data. It provides
the necessary infrastructure to handle multiple concurrent registries for multiple
clients and other convenience methods.
- Since:
- 1.13
- Author:
- Holger Knoche
-
Nested Class Summary
Nested classes/interfaces inherited from interface kieker.analysis.plugin.IPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE -
Field Summary
Fields inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
CONFIG_NAME, configuration, logger, projectContext, recordsTimeUnitFromProjectContext -
Constructor Summary
Constructors Modifier Constructor Description AbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext)Deprecated.Each Plugin requires a constructor with a Configuration object and a IProjectContext.protectedAbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext, java.lang.String cacheDurationProperty, java.util.concurrent.TimeUnit cacheDurationTimeUnit)Deprecated.Constructor which allows to specify a configuration property which contains the cache duration in the given time unit. -
Method Summary
Modifier and Type Method Description protected StringRegistryCachecreateCache(long expirationDuration, java.util.concurrent.TimeUnit expirationTimeUnit)Deprecated.Creates the cache to be used for storing string registries.protected abstract voiddeliverRecord(IMonitoringRecord monitoringRecord)Deprecated.Delivers the given record to the appropriate output port(s).protected voidensureThreadsStarted()Deprecated.Ensures that the required threads are started.protected voidhandleRegistryRecord(java.nio.ByteBuffer buffer)Deprecated.Handles the given raw data for a registry record.protected voidhandleRegularRecord(java.nio.ByteBuffer buffer)Deprecated.Handles the given raw data for a regular record.booleaninit()Deprecated.Initiates the start of a component.Methods inherited from class kieker.analysis.plugin.AbstractPlugin
areAllRepositoryPortsConnected, connect, connect, deliver, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getDefaultConfiguration, getIncomingPlugins, getPluginDescription, getPluginName, getRepository, getState, isConnectionAllowed, notifyNewIncomingConnection, notifyNewOutgoingConnection, shutdown, startMethods inherited from class kieker.analysis.analysisComponent.AbstractAnalysisComponent
getCurrentConfiguration, getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface kieker.analysis.plugin.IPlugin
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentConfiguration, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState, terminate
-
Constructor Details
-
AbstractStringRegistryReaderPlugin
public AbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext)Deprecated.Each Plugin requires a constructor with a Configuration object and a IProjectContext.- Parameters:
configuration- The configuration for this component.projectContext- The project context for this component. The component will be registered.
-
AbstractStringRegistryReaderPlugin
protected AbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext, java.lang.String cacheDurationProperty, java.util.concurrent.TimeUnit cacheDurationTimeUnit)Deprecated.Constructor which allows to specify a configuration property which contains the cache duration in the given time unit. Since defaults are populated by the super constructor, the access to the configuration property needs to be deferred until after the super constructor invocation.- Parameters:
configuration- The configuration for this component.projectContext- The project context for this component. The component will be registered.cacheDurationProperty- The name of the configuration property containing the cache durationcacheDurationTimeUnit- The time unit for the cache duration
-
-
Method Details
-
init
public boolean init()Deprecated.Description copied from class:AbstractReaderPluginInitiates the start of a component. This method is called once when a AnalysisController's run() method is called. This implementation must not be blocking! Asynchronous consumers would spawn (an) asynchronous thread(s) in this method.- Specified by:
initin interfaceIPlugin- Overrides:
initin classAbstractReaderPlugin- Returns:
- true on success; false otherwise.
-
createCache
protected StringRegistryCache createCache(long expirationDuration, java.util.concurrent.TimeUnit expirationTimeUnit)Deprecated.Creates the cache to be used for storing string registries. This method can be overriden to use a particular cache implementation.- Parameters:
expirationDuration- The duration until a cache entry expiresexpirationTimeUnit- The time unit for the cache expiration- Returns:
- An appropriate cache instance
-
ensureThreadsStarted
protected final void ensureThreadsStarted()Deprecated.Ensures that the required threads are started. This method should be called before registering a record. -
handleRegistryRecord
protected void handleRegistryRecord(java.nio.ByteBuffer buffer)Deprecated.Handles the given raw data for a registry record.- Parameters:
buffer- Byte buffer containing the raw data for the record
-
handleRegularRecord
protected void handleRegularRecord(java.nio.ByteBuffer buffer)Deprecated.Handles the given raw data for a regular record.- Parameters:
buffer- Byte buffer containing the raw data for the record
-
deliverRecord
Deprecated.Delivers the given record to the appropriate output port(s).- Parameters:
monitoringRecord- The monitoring record to deliver
-