Interface CPSessionManagementService


public interface CPSessionManagementService
This interface offers API for managing CP sessions.

CP sessions are used for tracking liveliness of Hazelcast servers and clients that hold CP resources.

See Also:
  • Method Details

    • getAllSessions

      CompletionStage<Collection<CPSession>> getAllSessions(String groupName)
      Returns a non-null collection of CP sessions that are currently active in the given CP group.
    • forceCloseSession

      CompletionStage<Boolean> forceCloseSession(String groupName, long sessionId)
      If a Hazelcast instance that owns a CP session crashes, its CP session is not terminated immediately. Instead, the session is closed after CPSubsystemConfig.getSessionTimeToLiveSeconds() passes. If it is known for sure that the session owner is not partitioned away and actually crashed, this method can be used for closing the session and releasing its resources immediately.