|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.harvester.distribute.HarvesterMessageHandler
dk.netarkivet.harvester.indexserver.distribute.TestIndexRequestServer
public final class TestIndexRequestServer
Index request server singleton. This class contains a singleton that handles requesting an index over JMS. This has two modes. 1) Given a file with a list of jobIDs, it will always return the same lucene index based on the list of job identifiers in the file regardless of what kind of index the client is requesting. 2) if setting "settings.harvester.indexserver.alwaysSetIsIndexReadyToFalse" is true it will always return the IndexRequestMessage with isindexready set to false.
Field Summary | |
---|---|
static java.lang.String |
ALWAYS_SET_ISINDEX_READY_TO_FALSE
settings.archive.indexserver.alwaysSetIsIndexReadyToFalse: The default: false. |
static java.lang.String |
JOBS_FOR_TESTINDEX
settings.harvester.indexserver.fileContainingJobsForTestindex: The file containing the list of jobids that the test index uses as data. |
Method Summary | |
---|---|
void |
cleanup()
Releases the JMS-connection and resets the singleton. |
void |
close()
Releases the JMS-connection and resets the singleton. |
static TestIndexRequestServer |
getInstance()
Get the unique index request server instance. |
void |
setHandler(RequestType t,
FileBasedCache<java.util.Set<java.lang.Long>> handler)
Set handler for certain type of index request. |
void |
start()
Look for stored messages to be preprocessed, and start processing those. |
void |
visit(IndexRequestMessage irMsg)
Given a request for an index over a set of job ids, use a cache to try to create the index, Then reply result. |
Methods inherited from class dk.netarkivet.harvester.distribute.HarvesterMessageHandler |
---|
onMessage, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String JOBS_FOR_TESTINDEX
public static java.lang.String ALWAYS_SET_ISINDEX_READY_TO_FALSE
Method Detail |
---|
public static TestIndexRequestServer getInstance()
public void setHandler(RequestType t, FileBasedCache<java.util.Set<java.lang.Long>> handler)
setHandler
in interface IndexRequestServerInterface
t
- The type of index requestedhandler
- The handler that should handle this request.public void visit(IndexRequestMessage irMsg) throws ArgumentNotValid
visit
in interface HarvesterMessageVisitor
visit
in class HarvesterMessageHandler
irMsg
- A message requesting an index.
ArgumentNotValid
- on null parameterpublic void close()
close
in interface IndexRequestServerInterface
public void cleanup()
cleanup
in interface CleanupIF
public void start()
start
in interface IndexRequestServerInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |