public abstract class AbstractStringRegistryReaderPlugin extends AbstractReaderPlugin
IPlugin.PluginInputPortReference, IPlugin.STATE
CONFIG_NAME, configuration, log, LOG, projectContext, recordsTimeUnitFromProjectContext
Modifier | Constructor and Description |
---|---|
|
AbstractStringRegistryReaderPlugin(Configuration configuration,
IProjectContext projectContext)
Each Plugin requires a constructor with a Configuration object and a IProjectContext.
|
protected |
AbstractStringRegistryReaderPlugin(Configuration configuration,
IProjectContext projectContext,
java.lang.String cacheDurationProperty,
java.util.concurrent.TimeUnit cacheDurationTimeUnit)
Constructor which allows to specify a configuration property which contains the cache duration in the
given time unit.
|
Modifier and Type | Method and Description |
---|---|
protected StringRegistryCache |
createCache(long expirationDuration,
java.util.concurrent.TimeUnit expirationTimeUnit)
Creates the cache to be used for storing string registries.
|
protected abstract void |
deliverRecord(IMonitoringRecord monitoringRecord)
Delivers the given record to the appropriate output port(s).
|
protected void |
ensureThreadsStarted()
Ensures that the required threads are started.
|
protected void |
handleRegistryRecord(java.nio.ByteBuffer buffer)
Handles the given raw data for a registry record.
|
protected void |
handleRegularRecord(java.nio.ByteBuffer buffer)
Handles the given raw data for a regular record.
|
boolean |
init()
Initiates the start of a component.
|
areAllRepositoryPortsConnected, connect, connect, deliver, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentRepositories, getDefaultConfiguration, getIncomingPlugins, getPluginDescription, getPluginName, getRepository, getState, isConnectionAllowed, notifyNewIncomingConnection, notifyNewOutgoingConnection, shutdown, start
getCurrentConfiguration, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
read
connect, getAllDisplayNames, getAllInputPortNames, getAllOutputPortNames, getAllRepositoryPortNames, getConnectedPlugins, getCurrentConfiguration, getCurrentRepositories, getName, getPluginDescription, getPluginName, getState, terminate
public AbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext)
configuration
- The configuration for this component.projectContext
- The project context for this component. The component will be registered.protected AbstractStringRegistryReaderPlugin(Configuration configuration, IProjectContext projectContext, java.lang.String cacheDurationProperty, java.util.concurrent.TimeUnit cacheDurationTimeUnit)
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 durationpublic boolean init()
AbstractReaderPlugin
init
in interface IPlugin
init
in class AbstractReaderPlugin
protected StringRegistryCache createCache(long expirationDuration, java.util.concurrent.TimeUnit expirationTimeUnit)
expirationDuration
- The duration until a cache entry expiresexpirationTimeUnit
- The time unit for the cache expirationprotected final void ensureThreadsStarted()
protected void handleRegistryRecord(java.nio.ByteBuffer buffer)
buffer
- Byte buffer containing the raw data for the recordprotected void handleRegularRecord(java.nio.ByteBuffer buffer)
buffer
- Byte buffer containing the raw data for the recordprotected abstract void deliverRecord(IMonitoringRecord monitoringRecord)
monitoringRecord
- The monitoring record to deliverCopyright 2017 Kieker Project, http://kieker-monitoring.net