|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.indexserver.FileBasedCache<java.util.Set<T>>
dk.netarkivet.harvester.indexserver.MultiFileBasedCache<java.lang.Long>
dk.netarkivet.harvester.indexserver.distribute.IndexRequestClient
public class IndexRequestClient
Client for index request server. Allows to request an index of some type over a list of jobs. Factory method will return the index request client of the type wished.
Field Summary | |
---|---|
static java.lang.String |
INDEXREQUEST_TIMEOUT
settings.common.indexClient.indexRequestTimeout: Setting for the amount of time, in milliseconds, we should wait for replies when issuing a call to generate an index over some jobs. |
static java.lang.String |
INDEXREQUEST_USE_LOCAL_FTPSERVER
settings.common.indexClient.useLocalFtpServer: Setting for using the ftpserver assigned to the client instead of the one assigned to the indexserver. |
Fields inherited from class dk.netarkivet.harvester.indexserver.FileBasedCache |
---|
cacheDir |
Method Summary | |
---|---|
protected java.util.Set<java.lang.Long> |
cacheData(java.util.Set<java.lang.Long> jobSet)
This method makes sure the actual caching of underlying data is done using the index server. |
protected long |
getIndexTimeout()
How long should we wait for index replies? |
static IndexRequestClient |
getInstance(RequestType type)
Factory method returning an IndexRequestClient for the given type of index cache. |
void |
requestIndex(java.util.Set<java.lang.Long> jobSet,
java.lang.Long harvestId)
Method to request an Index without having the result sent right away. |
protected boolean |
useLocalFtpserver()
Check if we should use local ftpserver or not, provided you are using FTPRemoteFile as the CommonSettings.REMOTE_FILE_CLASS . |
Methods inherited from class dk.netarkivet.harvester.indexserver.MultiFileBasedCache |
---|
getCacheFile |
Methods inherited from class dk.netarkivet.harvester.indexserver.FileBasedCache |
---|
cache, get, getCacheDir, getIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface dk.netarkivet.common.distribute.indexserver.JobIndexCache |
---|
getIndex |
Field Detail |
---|
public static final java.lang.String INDEXREQUEST_TIMEOUT
public static final java.lang.String INDEXREQUEST_USE_LOCAL_FTPSERVER
Method Detail |
---|
public static IndexRequestClient getInstance(RequestType type) throws ArgumentNotValid
type
- The type of this cache.
ArgumentNotValid
- if type is null.protected java.util.Set<java.lang.Long> cacheData(java.util.Set<java.lang.Long> jobSet) throws IOFailure, IllegalState, ArgumentNotValid
cacheData
in class FileBasedCache<java.util.Set<java.lang.Long>>
jobSet
- The set of job IDs.
ArgumentNotValid
- on null argument; or on wrong parameters in
replied message.
IOFailure
- on trouble in communication or invalid reply types.
IllegalState
- if message is not OK.FileBasedCache.cache(I)
,
FileBasedCache.getIndex(I)
protected long getIndexTimeout()
protected boolean useLocalFtpserver()
CommonSettings.REMOTE_FILE_CLASS
.
This always returns false, when CommonSettings.REMOTE_FILE_CLASS
is not FTPRemoteFile
.
public void requestIndex(java.util.Set<java.lang.Long> jobSet, java.lang.Long harvestId) throws IOFailure, IllegalState, ArgumentNotValid
requestIndex
in interface JobIndexCache
jobSet
- The set of job IDs.harvestId
- The ID of the harvest requesting this index.
IOFailure
- On trouble in communication or invalid reply types.
IllegalState
- if message is not OK.
ArgumentNotValid
- if the jobSet is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |