Class SshSemaphoreFactory
java.lang.Object
org.sentrysoftware.metricshub.engine.telemetry.SshSemaphoreFactory
A factory class for managing SSH semaphores associated with hostnames.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateOrGetSempahore(String hostname) Gets the Semaphore associated with the hostname, creating it if it does not exist.voiddeleteSemaphore(String hostname) Removes the host-semaphore key-value pair for the specified hostname.static SshSemaphoreFactoryGets the static instance containing all semaphores
-
Constructor Details
-
SshSemaphoreFactory
public SshSemaphoreFactory()
-
-
Method Details
-
createOrGetSempahore
Gets the Semaphore associated with the hostname, creating it if it does not exist.- Parameters:
hostname- The hostname for which to retrieve the Semaphore.- Returns:
- The Semaphore associated with the hostname.
-
getInstance
Gets the static instance containing all semaphores- Returns:
- the static instance containing all semaphores
-
deleteSemaphore
Removes the host-semaphore key-value pair for the specified hostname.- Parameters:
hostname- The hostname for which to delete the Semaphore.
-