@ThreadSafe public class CopySession extends Object implements Session
| 构造器和说明 |
|---|
CopySession(RaftClientService rpcService,
Scheduler timerManager,
SnapshotThrottle snapshotThrottle,
RaftOptions raftOptions,
RpcRequests.GetFileRequest.Builder rb,
Endpoint ep) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void setDestBuf(ByteBufferCollector bufRef)
public void setCopyOptions(CopyOptions copyOptions)
public void setOutputStream(OutputStream out)
public void join()
throws InterruptedException
Sessionjoin 在接口中 SessionInterruptedException - if the current thread is interrupted
while waitingCopyright © 2021. All rights reserved.