public class OAIPMHImporter extends java.lang.Thread implements Importer, java.lang.Comparable<OAIPMHImporter>
Modifier and Type | Field and Description |
---|---|
private ClientIdentification.Agent |
agent |
private int |
chunkCount |
private int |
completeListSize |
static java.lang.String |
filenamePrefix |
static char |
filenameSeparationChar |
static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> |
finishedJobs |
private long |
finishTime |
static char |
hostReplacementChar |
private static int |
importerCounter |
private LoaderDispatcher |
loader |
private java.lang.String |
message |
private static java.lang.Object |
N |
private int |
recordsCount |
private ResumptionToken |
resumptionToken |
static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> |
runningJobs |
private int |
serialNumber |
private DigestURL |
source |
static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> |
startedJobs |
private long |
startTime |
Constructor and Description |
---|
OAIPMHImporter(LoaderDispatcher loader,
ClientIdentification.Agent agent,
DigestURL source) |
Modifier and Type | Method and Description |
---|---|
int |
chunkCount() |
int |
compareTo(OAIPMHImporter o) |
int |
count() |
boolean |
equals(java.lang.Object obj) |
static java.lang.String |
filename4Source(DigestURL source)
get a file name for a source.
|
int |
getCompleteListSize() |
private static java.util.Map<java.lang.String,java.util.Date> |
getLoadedOAIServer(java.io.File surrogates) |
static java.util.Map<java.lang.String,java.util.Date> |
getLoadedOAIServer(java.io.File surrogatesIn,
java.io.File surrogatesOut)
get a map for already loaded oai-pmh servers and their latest access date
|
ResumptionToken |
getResumptionToken() |
int |
hashCode() |
static java.lang.String |
hostID(DigestURL source)
compute a host id that is also used in the getLoadedOAIServer method for the map key
|
long |
remainingTime()
return the remaining seconds for the completion of all records in milliseconds
|
void |
run()
the run method from runnable
|
long |
runningTime()
return the time this import is already running
|
java.lang.String |
source() |
int |
speed()
return the number of articles per second
|
java.lang.String |
status() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private static int importerCounter
private static final java.lang.Object N
public static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> startedJobs
public static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> runningJobs
public static java.util.concurrent.ConcurrentHashMap<OAIPMHImporter,java.lang.Object> finishedJobs
private final LoaderDispatcher loader
private DigestURL source
private int recordsCount
private int chunkCount
private int completeListSize
private final long startTime
private long finishTime
private final ResumptionToken resumptionToken
private java.lang.String message
private final int serialNumber
private final ClientIdentification.Agent agent
public static final char hostReplacementChar
public static final char filenameSeparationChar
public static final java.lang.String filenamePrefix
public OAIPMHImporter(LoaderDispatcher loader, ClientIdentification.Agent agent, DigestURL source)
public int chunkCount()
public ResumptionToken getResumptionToken()
public int getCompleteListSize()
public long remainingTime()
Importer
remainingTime
in interface Importer
public long runningTime()
Importer
runningTime
in interface Importer
public int speed()
Importer
public void run()
Importer
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(OAIPMHImporter o)
compareTo
in interface java.lang.Comparable<OAIPMHImporter>
public static java.util.Map<java.lang.String,java.util.Date> getLoadedOAIServer(java.io.File surrogatesIn, java.io.File surrogatesOut)
surrogatesIn
- surrogatesOut
- private static java.util.Map<java.lang.String,java.util.Date> getLoadedOAIServer(java.io.File surrogates)
public static final java.lang.String hostID(DigestURL source)
source
- public static final java.lang.String filename4Source(DigestURL source)
source
-