public class Slave extends Object implements Callable<RsyncStats>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BLOCKSIZE |
Constructor and Description |
---|
Slave(File file,
SlaveChannel channel,
String name) |
Slave(RandomAccessFile file,
SlaveChannel channel,
String name)
using the default blocksize
|
Slave(RandomAccessFile file,
SlaveChannel channel,
String name,
int blocksize) |
Modifier and Type | Method and Description |
---|---|
RsyncStats |
call() |
protected void |
computeChecksums() |
int |
getBlocksize() |
SlaveChannel |
getChannel() |
List<byte[]> |
getStrongChecksums() |
File |
getTmpFile(File file) |
List<Long> |
getWeakChecksums() |
static int |
reasonableBlockSize(File file) |
void |
reconstructFile() |
void |
setFileAccess(UserFileAccess f) |
public static final int DEFAULT_BLOCKSIZE
public Slave(File file, SlaveChannel channel, String name) throws FileNotFoundException
FileNotFoundException
public Slave(RandomAccessFile file, SlaveChannel channel, String name)
local
- file that should be synchronized with the masterchannel
- - communication to the mastername
- - file namepublic Slave(RandomAccessFile file, SlaveChannel channel, String name, int blocksize)
file
- - local file that should be synchronized with the masterchannel
- - communication to the masterblocksize
- public RsyncStats call() throws Exception
call
in interface Callable<RsyncStats>
Exception
protected void computeChecksums() throws IOException
IOException
public SlaveChannel getChannel()
public int getBlocksize()
public List<byte[]> getStrongChecksums()
public void setFileAccess(UserFileAccess f)
public static int reasonableBlockSize(File file)
Copyright © 2010–2016 UNICORE. All rights reserved.