Class RasmgrKeepAlive
- java.lang.Object
-
- org.rasdaman.rasnet.communication.RasmgrKeepAlive
-
public class RasmgrKeepAlive extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RasmgrKeepAlive(org.rasdaman.rasnet.service.RasmgrClientServiceGrpc.RasmgrClientServiceBlockingStub rasmgrService, int clientID, long aliveIntervalMilliseconds)Create a new RasmgrKeepAlive object that, when started, connects throw the given RasmgrClientServiceGrpc to the rasmgr and sends keep alive messages.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()If the stop method was not called, this method will call it.booleanisRunning()Check if the worker thread is running.voidstart()Creates and starts a thread that will send KeepAlive messages to the server.voidstop()Stop the thread that is sending KeepAlive messages to the server.
-
-
-
Constructor Detail
-
RasmgrKeepAlive
public RasmgrKeepAlive(org.rasdaman.rasnet.service.RasmgrClientServiceGrpc.RasmgrClientServiceBlockingStub rasmgrService, int clientID, long aliveIntervalMilliseconds)Create a new RasmgrKeepAlive object that, when started, connects throw the given RasmgrClientServiceGrpc to the rasmgr and sends keep alive messages.- Parameters:
rasmgrService- GRPC service that is connected to a rasserverclientID- String that uniquely identifies the client on the serveraliveIntervalMilliseconds- The number of milliseconds between each heart beat.
-
-
Method Detail
-
start
public void start()
Creates and starts a thread that will send KeepAlive messages to the server. After this method is called, stop must be called. This method can be called only once.
-
isRunning
public boolean isRunning()
Check if the worker thread is running.- Returns:
-
stop
public void stop()
Stop the thread that is sending KeepAlive messages to the server.
-
finalize
protected void finalize() throws java.lang.ThrowableIf the stop method was not called, this method will call it.- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-