Package com.jalios.jstore.jsync
Class FileFetcher
- java.lang.Object
-
- com.jalios.jstore.jsync.FileFetcher
-
- All Implemented Interfaces:
JSyncConstants
,JaliosConstants
,java.lang.Runnable
public class FileFetcher extends java.lang.Object implements java.lang.Runnable, JSyncConstants
This class spawns a thread to download a set of file- Author:
- Olivier Dedieu
-
-
Field Summary
-
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
-
Fields inherited from interface com.jalios.jstore.jsync.JSyncConstants
HEADER_SECRET, SC_BAD_ADDRESS, SC_BAD_LEADER, SC_BAD_LOG_PREFIX, SC_BAD_MESSAGE, SC_CHECK_COMMIT_WORK_FAILED, SC_COMMIT_WORK_FAILED, SC_DISCONNECTED, SC_EMPTY_PT, SC_INCOMPATIBLE_LOG_FORMAT, 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_DISCONNECTED, STATUS_LEADER, STATUS_LONE, STATUS_MEMBER, STATUS_SUBLEADER
-
-
Constructor Summary
Constructors Constructor Description FileFetcher(JSyncReplica jsyncReplica, java.io.File tgtDir, java.io.File downloadDir, long downloadInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDownloadFile(java.util.Set<FileEntry> fileSet, java.lang.String urid)
Add new file to downloadvoid
close()
Terminate this file fetcher and its thread.void
run()
-
-
-
Constructor Detail
-
FileFetcher
public FileFetcher(JSyncReplica jsyncReplica, java.io.File tgtDir, java.io.File downloadDir, long downloadInterval)
- Since:
- jcms-4.1
-
-
Method Detail
-
addDownloadFile
public void addDownloadFile(java.util.Set<FileEntry> fileSet, java.lang.String urid)
Add new file to download- Parameters:
fileSet
- a set of FileEntry to downloadurid
- the urid of the send- Since:
- jcms-5.0.4
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
close
public void close()
Terminate this file fetcher and its thread.
-
-