Package org.apache.lucene.replicator.nrt
Class CopyOneFile
java.lang.Object
org.apache.lucene.replicator.nrt.CopyOneFile
- All Implemented Interfaces:
Closeable
,AutoCloseable
Copies one file from an incoming DataInput to a dest filename in a local Directory
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCopyOneFile
(CopyOneFile other, DataInput in) Transfers this file copy to another input, continuing where the first one left offCopyOneFile
(DataInput in, ReplicaNode dest, String name, FileMetaData metaData, byte[] buffer) -
Method Summary
-
Field Details
-
name
-
tmpName
-
metaData
-
bytesToCopy
public final long bytesToCopy
-
-
Constructor Details
-
CopyOneFile
public CopyOneFile(DataInput in, ReplicaNode dest, String name, FileMetaData metaData, byte[] buffer) throws IOException - Throws:
IOException
-
CopyOneFile
Transfers this file copy to another input, continuing where the first one left off
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
visit
Copy another chunk of bytes, returning true once the copy is done- Throws:
IOException
-
getBytesCopied
public long getBytesCopied()
-