Class SessionManager
java.lang.Object
io.streamnative.oxia.client.session.SessionManager
- All Implemented Interfaces:
SessionNotificationListener,AutoCloseable,Consumer<ShardManager.ShardAssignmentChanges>
public class SessionManager
extends Object
implements AutoCloseable, Consumer<ShardManager.ShardAssignmentChanges>, SessionNotificationListener
-
Constructor Summary
ConstructorsConstructorDescriptionSessionManager(@NonNull ScheduledExecutorService executor, @NonNull ClientConfig config, @NonNull OxiaStubProvider stubProvider, @NonNull InstrumentProvider instrumentProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(@NonNull ShardManager.ShardAssignmentChanges changes) voidclose()@NonNull CompletableFuture<Session>getSession(long shardId) voidonSessionClosed(Session session)
-
Constructor Details
-
SessionManager
public SessionManager(@NonNull @NonNull ScheduledExecutorService executor, @NonNull @NonNull ClientConfig config, @NonNull @NonNull OxiaStubProvider stubProvider, @NonNull @NonNull InstrumentProvider instrumentProvider)
-
-
Method Details
-
getSession
-
onSessionClosed
- Specified by:
onSessionClosedin interfaceSessionNotificationListener
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
accept
- Specified by:
acceptin interfaceConsumer<ShardManager.ShardAssignmentChanges>
-