com.jalios.jstore.jsync
Class FileFetcher

java.lang.Object
  extended by com.jalios.jstore.jsync.FileFetcher
All Implemented Interfaces:
JSyncConstants, JaliosConstants, Runnable

public class FileFetcher
extends Object
implements Runnable, JSyncConstants

This class spawns a thread to download a set of file

Version:
$Revision: 21412 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Fields inherited from interface com.jalios.jstore.jsync.JSyncConstants
SC_BAD_ADDRESS, SC_BAD_LEADER, SC_BAD_MESSAGE, SC_INTERNAL_SERVER_ERROR, SC_JOIN_REJECTED, SC_LEADER_CANNOT_JOIN, SC_NO_ACK, SC_NO_SEND, SC_OK, SC_UNKNOWN, SC_UNKNOWN_URID, SC_URID_ALREADY_ADDED, STATUS_LEADER, STATUS_LONE, STATUS_MEMBER, STATUS_SUBLEADER
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Constructor Summary
FileFetcher(JSyncReplica jsyncReplica, File tgtDir, File downloadDir, long downloadInterval)
           
 
Method Summary
 void addDownloadFile(Set<FileEntry> fileSet, String urid)
          Add new file to download
 void close()
          Terminate this file fetcher and its thread.
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

FileFetcher

public FileFetcher(JSyncReplica jsyncReplica,
                   File tgtDir,
                   File downloadDir,
                   long downloadInterval)
Since:
jcms-4.1
Method Detail

addDownloadFile

public void addDownloadFile(Set<FileEntry> fileSet,
                            String urid)
Add new file to download

Parameters:
fileSet - a set of FileEntry to download
urid - the urid of the send
Since:
jcms-5.0.4

run

public void run()
Specified by:
run in interface Runnable

close

public void close()
Terminate this file fetcher and its thread.



Copyright © 2001-2010 Jalios SA. All Rights Reserved.