public interface ControlSystemSupportFactory
Factory that can create a
ControlSystemSupport. Each control-system
support module must provide such a factory which is responsible for creating
its respective control-system support when requested by the archive server.
In order to register the factory with the server, a properties file with the
META-INF/cassandra-pv-archiver.factories has to be added to
the class-path. Within this property file, the fully qualified name of this
interface has to be used as the property key and the fully qualified name of
the class implementing the interface has to be used as the property value. If
there are multiple classes implementing this interface within the same
module, the names of those classes can be separated by commas.
When there are multiple control-system support modules in the class-path, multiple instances of the property file might exist in the class-path. The discovery mechanism is able to deal with such a situation, automatically taking all these files into consideration when trying to find the factory implementations.
Classes implementing this interface must have a default constructor. Otherwise the discovery mechanism is not able to instantiate the class, resulting in a fatal error.
Classes implementing this interface must also be thread-safe. This means that
they must allow for multiple threads calling its method in parallel. The
ControlSystemSupports returned by implementations of this
interface must also be thread-safe.
|Modifier and Type||Method and Description|
Creates an instance of the control-system support associated with this factory.
Returns the prefix used for the configuration options associated with this control-system support.
ControlSystemSupport<?> createControlSystemSupport(Map<String,String> configuration, Session session)
configuration- map containing configuration options. The configuration options are properties that have been extracted from the server configuration file according to the prefix specified by
getConfigurationPrefix(). Values might be
null, but keys are never
null. The meaning of the configuration options is implementation-specific, but the naming scheme should use camel-case syntax, starting with a lower-case letter. The keys in the configuration map are specified with the prefix removed.
session- Cassandra session used for database operations.
Returns the prefix used for the configuration options associated with this control-system support. This prefix should use camel-case syntax and start with a lower-case letter. For example, a control-system support using the identifier "my_control_system" should use a prefix of "myControlSystem".
Within the server configuration file, the prefix "controlSystem" has to
be prepended to all properties associated with a control-system support.
For example, if a factory specified a configuration prefix of
"myControlSystem", the property "controlSystem.myControlSystem.myOption"
would be passed to
using the key "myOption".
Copyright © 2011–2016 aquenos GmbH. All rights reserved.