|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.norconex.jef.progress.JobProgressPropertiesFileSerializer
public class JobProgressPropertiesFileSerializer
Serializer using a file to store job process information. The created file name matches the job id, plus the ".job" extension. The path where to locate the file depends on the constructor invoked.
Constructor Summary | |
---|---|
JobProgressPropertiesFileSerializer(String jobDir)
Creates a file-based job progress serializer storing files in the given job directory. |
Method Summary | |
---|---|
void |
backup(String namespace,
String jobId,
Date backupDate)
Backups job progress. |
JobProgress |
deserialize(String namespace,
String jobId,
IJobContext jobContext)
Deserializes a job progress. |
void |
remove(String namespace,
String jobId)
Removes job progress. |
void |
serialize(String namespace,
IJobStatus jobProgress)
Serializes a job progress. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobProgressPropertiesFileSerializer(String jobDir)
jobDir
- the base directory where to serialize the job progressMethod Detail |
---|
public final void serialize(String namespace, IJobStatus jobProgress) throws IOException
IJobProgressSerializer
serialize
in interface IJobProgressSerializer
namespace
- name space given to the job progressjobProgress
- job progress
IOException
- problem serializing job progresspublic final JobProgress deserialize(String namespace, String jobId, IJobContext jobContext) throws IOException
IJobProgressSerializer
null
is not allowed).
deserialize
in interface IJobProgressSerializer
namespace
- name space given to the job progressjobId
- job unique identifierjobContext
- job context for which to obtain job progress
IOException
- problem deserializing job progresspublic final void remove(String namespace, String jobId) throws IOException
IJobProgressSerializer
IJobProgressSerializer.deserialize(String, String, IJobContext)
method.
remove
in interface IJobProgressSerializer
namespace
- name space given to the job progressjobId
- unique identifier of job we want to remove status
IOException
- problem removing job progresspublic final void backup(String namespace, String jobId, Date backupDate) throws IOException
IJobProgressSerializer
IJobProgressSerializer.deserialize(String, String, IJobContext)
method.
backup
in interface IJobProgressSerializer
namespace
- name space given to the job progressjobId
- unique identifier of job progress we want to backupbackupDate
- date used to timestamp to backup
IOException
- problem backing-up job progress
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |