Class ConnectorStore
java.lang.Object
org.sentrysoftware.metricshub.engine.connector.model.ConnectorStore
- All Implemented Interfaces:
Serializable
Manages the storage and retrieval of
Connector instances.
The instances are stored in a map where the key is the connector file name, and the value is the corresponding Connector object.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConnectorStore(Path connectorDirectory) Constructs aConnectorStoreusing the specified connector directory. -
Method Summary
-
Constructor Details
-
ConnectorStore
Constructs aConnectorStoreusing the specified connector directory.- Parameters:
connectorDirectory- The path to the directory containing connector files.
-
-
Method Details
-
addOne
Add a newConnectorinstance- Parameters:
id- the id of the connectorconnector- theConnectorinstance to add
-
addMany
Adds multiple instances ofConnectorto the connector store. The connectors are provided as aMapwhere each entry represents a connector with its unique identifier.- Parameters:
connectors- AMapcontaining connectors to be added, keyed by their unique identifiers.
-
newConnectorStore
Creates and returns a new instance of ConnectorStore, initialized with a copy of the current connectors. This method is useful for creating a snapshot of the current state of the ConnectorStore used for each resource. Changes made to the new ConnectorStore will not affect the original one.- Returns:
- A new ConnectorStore instance with the same connectors as the current store.
-