public class GRpcAgentFileStreamServiceImpl extends java.lang.Object implements AgentFileStreamService
AgentFileStreamService
over gRPC.
Sets up a persistent 2-way stream ('sync') to push manifest updates and receive file requests.
When a file request is received, a creates a new 2 way stream ('transmit') and pushes file chunks, waits for ACK,
sends the next chunk, ... until the file range requested is transmitted. Then the stream is shut down.Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.util.concurrent.ScheduledFuture<?>> |
forceServerSync()
Request the service perform an update outside of the regular schedule to make sure the server has the most
up-to-date view of local files.
|
void |
start(java.lang.String claimedJobId,
java.nio.file.Path jobDirectoryRoot)
Start the service.
|
void |
stop()
Stop the service.
|
public void start(java.lang.String claimedJobId, java.nio.file.Path jobDirectoryRoot)
start
in interface AgentFileStreamService
claimedJobId
- the claimed job idjobDirectoryRoot
- the job directorypublic void stop()
stop
in interface AgentFileStreamService
public java.util.Optional<java.util.concurrent.ScheduledFuture<?>> forceServerSync()
forceServerSync
in interface AgentFileStreamService