Package org.apache.lucene.replicator.nrt
Class CopyOneFile
- java.lang.Object
-
- org.apache.lucene.replicator.nrt.CopyOneFile
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CopyOneFile extends Object implements Closeable
Copies one file from an incoming DataInput to a dest filename in a local Directory
-
-
Field Summary
Fields Modifier and Type Field Description longbytesToCopyFileMetaDatametaDataStringnameStringtmpName
-
Constructor Summary
Constructors Constructor Description CopyOneFile(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longgetBytesCopied()booleanvisit()Copy another chunk of bytes, returning true once the copy is done
-
-
-
Field Detail
-
name
public final String name
-
tmpName
public final String tmpName
-
metaData
public final FileMetaData metaData
-
bytesToCopy
public final long bytesToCopy
-
-
Constructor Detail
-
CopyOneFile
public CopyOneFile(DataInput in, ReplicaNode dest, String name, FileMetaData metaData, byte[] buffer) throws IOException
- Throws:
IOException
-
CopyOneFile
public CopyOneFile(CopyOneFile other, DataInput in)
Transfers this file copy to another input, continuing where the first one left off
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
visit
public boolean visit() throws IOExceptionCopy another chunk of bytes, returning true once the copy is done- Throws:
IOException
-
getBytesCopied
public long getBytesCopied()
-
-