@ThreadSafe public class CopySession extends Object implements Session
| Constructor and Description |
|---|
CopySession(RaftClientService rpcService,
Scheduler timerManager,
SnapshotThrottle snapshotThrottle,
RaftOptions raftOptions,
RpcRequests.GetFileRequest.Builder rb,
Endpoint ep) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel the copy job.
|
void |
close() |
void |
join()
Block the thread to wait the copy job finishes or canceled.
|
void |
setCopyOptions(CopyOptions copyOptions) |
void |
setDestBuf(ByteBufferCollector bufRef) |
void |
setDestPath(String destPath) |
void |
setOutputStream(OutputStream out) |
Status |
status()
Returns the copy job status.
|
public CopySession(RaftClientService rpcService, Scheduler timerManager, SnapshotThrottle snapshotThrottle, RaftOptions raftOptions, RpcRequests.GetFileRequest.Builder rb, Endpoint ep)
public void setDestPath(String destPath)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void setDestBuf(ByteBufferCollector bufRef)
public void setCopyOptions(CopyOptions copyOptions)
public void setOutputStream(OutputStream out)
public void cancel()
Sessionpublic void join()
throws InterruptedException
Sessionjoin in interface SessionInterruptedException - if the current thread is interrupted
while waitingCopyright © 2024. All rights reserved.