Class IndexRequestClient

    • Field Summary

      Fields 
      Modifier and Type Field Description
      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.
    • Field Detail

      • INDEXREQUEST_TIMEOUT

        public static final 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.
        See Also:
        Constant Field Values
      • INDEXREQUEST_USE_LOCAL_FTPSERVER

        public static final 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. Set to false by default.
        See Also:
        Constant Field Values
    • Method Detail

      • cacheData

        protected java.util.Set<java.lang.Long> cacheData​(java.util.Set<java.lang.Long> jobSet)
                                                   throws IOFailure,
                                                          IllegalState,
                                                          ArgumentNotValid
        This method makes sure the actual caching of underlying data is done using the index server. It will convert calls into an IndexRequestMessage which is sent to the server. The Set<Long> of found jobs, and the side effect of caching the index, is done using this communication with the server. The resulting files will be unzipped into the cache dir.

        This method should not be called directly! Instead call cache() or getIndex().

        Specified by:
        cacheData in class FileBasedCache<java.util.Set<java.lang.Long>>
        Parameters:
        jobSet - The set of job IDs.
        Returns:
        The set of found job IDs.
        Throws:
        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.
        See Also:
        FileBasedCache.cache(T), FileBasedCache.getIndex(T)
      • getIndexTimeout

        protected long getIndexTimeout()
        How long should we wait for index replies?
        Returns:
        Index timeout value in milliseconds.