Interface IJobDescription
-
- All Known Implementing Classes:
JobDescription
public interface IJobDescription
This is a paper object describing a job. Each job in lcf has: - an identifier; - a description; - a repository connection; - one of a number of scheduling options: starting every n hours/days/weeks/months, on specific dates, or "continuous" (which basically establishes a priority queue based on modification frequency); - "seeds" (or starting points), which are the places that scanning begins. Also remember that since incremental deletion must occur on a job-by-job basis, the scanning data also records the job that performed the scan, so that each job can rescan previous ingested data, and delete documents that have been removed.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
static int
HOPCOUNT_ACCURATE
static int
HOPCOUNT_NEVERDELETE
static int
HOPCOUNT_NODELETE
static int
START_DISABLE
static int
START_WINDOWBEGIN
static int
START_WINDOWINSIDE
static int
TYPE_CONTINUOUS
static int
TYPE_SPECIFIED
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addHopCountFilter(java.lang.String linkType, java.lang.Long maxHops)
Add a hopcount filter to the job.Specification
addNotification(java.lang.String notificationConnectionName, java.lang.String notificationDescription)
Add a notification.Specification
addPipelineStage(int prerequisiteStage, boolean isOutput, java.lang.String pipelineStageConnectionName, java.lang.String pipelineStageDescription)
Add a pipeline connection.void
addScheduleRecord(ScheduleRecord record)
Add a record.void
clearHopCountFilters()
Clear the set of hopcount filters for the job.void
clearNotifications()
Clear notification connections.void
clearPipeline()
Clear pipeline connections.void
clearScheduleRecords()
Clear all the scheduling records.int
countNotifications()
Get a count of pipeline connections.int
countPipelineStages()
Get a count of pipeline connections.void
deleteNotification(int index)
Delete a notification.void
deletePipelineStage(int index)
Delete a pipeline stage.void
deleteScheduleRecord(int index)
Delete a specified schedule record.java.lang.String
getConnectionName()
Get the connection name.java.lang.String
getDescription()
Get the description.java.lang.Long
getExpiration()
Get the expiration time, in milliseconds.java.util.Map
getHopCountFilters()
Get the set of hopcount filters the job has defined.int
getHopcountMode()
Get the hopcount mode.java.lang.Long
getID()
Get the id.java.lang.Long
getInterval()
Get the rescheduling interval, in milliseconds.boolean
getIsNew()
Get isnew.java.lang.Long
getMaxInterval()
Get the maximum rescheduling interval, in milliseconds.java.lang.String
getNotificationConnectionName(int index)
Get a specific notification connection name.java.lang.String
getNotificationDescription(int index)
Get a specific notification description.Specification
getNotificationSpecification(int index)
Get a specific notification specification.java.lang.String
getPipelineStageConnectionName(int index)
Get a specific pipeline connection name.java.lang.String
getPipelineStageDescription(int index)
Get a specific pipeline stage description.boolean
getPipelineStageIsOutputConnection(int index)
Check if a pipeline stage is an output connection.int
getPipelineStagePrerequisite(int index)
Get the prerequisite stage number for a pipeline stage.Specification
getPipelineStageSpecification(int index)
Get a specific pipeline stage specification.int
getPriority()
Get the job priority.java.lang.Long
getReseedInterval()
Get the reseeding interval, in milliseconds.ScheduleRecord
getScheduleRecord(int index)
Get a specified schedule record.int
getScheduleRecordCount()
Get the number of schedule records.Specification
getSpecification()
Get the document specification (which can be modified).int
getStartMethod()
Get the job's start method.int
getType()
Get the job type.Specification
insertNotification(int index, java.lang.String notificationConnectionName, java.lang.String notificationDescription)
Insert a new notification.Specification
insertPipelineStage(int index, boolean isOutput, java.lang.String pipelineStageConnectionName, java.lang.String pipelineStageDescription)
Insert a new pipeline stage.void
setConnectionName(java.lang.String connectionName)
Set the connection name.void
setDescription(java.lang.String description)
Set the description.void
setExpiration(java.lang.Long time)
Set the expiration time, in milliseconds.void
setHopcountMode(int mode)
Set the hopcount mode.void
setInterval(java.lang.Long interval)
Set the rescheduling interval, in milliseconds, or null if forever.void
setMaxInterval(java.lang.Long interval)
Set the maximum rescheduling interval, in milliseconds, or null if forever.void
setPriority(int priority)
Set the job priority.void
setReseedInterval(java.lang.Long interval)
Set the reseeding interval, in milliseconds.void
setStartMethod(int startMethod)
Set the job's start method.void
setType(int type)
Set the job type.
-
-
-
Field Detail
-
_rcsid
static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
TYPE_CONTINUOUS
static final int TYPE_CONTINUOUS
- See Also:
- Constant Field Values
-
TYPE_SPECIFIED
static final int TYPE_SPECIFIED
- See Also:
- Constant Field Values
-
START_WINDOWBEGIN
static final int START_WINDOWBEGIN
- See Also:
- Constant Field Values
-
START_WINDOWINSIDE
static final int START_WINDOWINSIDE
- See Also:
- Constant Field Values
-
START_DISABLE
static final int START_DISABLE
- See Also:
- Constant Field Values
-
HOPCOUNT_ACCURATE
static final int HOPCOUNT_ACCURATE
- See Also:
- Constant Field Values
-
HOPCOUNT_NODELETE
static final int HOPCOUNT_NODELETE
- See Also:
- Constant Field Values
-
HOPCOUNT_NEVERDELETE
static final int HOPCOUNT_NEVERDELETE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIsNew
boolean getIsNew()
Get isnew.- Returns:
- true if the object is new.
-
getID
java.lang.Long getID()
Get the id.- Returns:
- the id.
-
setDescription
void setDescription(java.lang.String description)
Set the description.- Parameters:
description
- is the description.
-
getDescription
java.lang.String getDescription()
Get the description.- Returns:
- the description
-
setConnectionName
void setConnectionName(java.lang.String connectionName)
Set the connection name.- Parameters:
connectionName
- is the connection name.
-
getConnectionName
java.lang.String getConnectionName()
Get the connection name.- Returns:
- the connection name.
-
clearPipeline
void clearPipeline()
Clear pipeline connections.
-
addPipelineStage
Specification addPipelineStage(int prerequisiteStage, boolean isOutput, java.lang.String pipelineStageConnectionName, java.lang.String pipelineStageDescription)
Add a pipeline connection.- Parameters:
prerequisiteStage
- is the prerequisite stage number for this connection, or -1 if there is none.isOutput
- is true if the pipeline stage is an output connection.pipelineStageConnectionName
- is the name of the pipeline connection to add.pipelineStageDescription
- is a description of the pipeline stage being added.- Returns:
- the empty output specification for this pipeline stage.
-
countPipelineStages
int countPipelineStages()
Get a count of pipeline connections.- Returns:
- the current number of pipeline connections.
-
getPipelineStagePrerequisite
int getPipelineStagePrerequisite(int index)
Get the prerequisite stage number for a pipeline stage.- Parameters:
index
- is the index of the pipeline stage to get.- Returns:
- the preceding stage number for that stage, or -1 if there is none.
-
getPipelineStageIsOutputConnection
boolean getPipelineStageIsOutputConnection(int index)
Check if a pipeline stage is an output connection.- Parameters:
index
- is the index of the pipeline stage to check.- Returns:
- true if it is an output connection.
-
getPipelineStageConnectionName
java.lang.String getPipelineStageConnectionName(int index)
Get a specific pipeline connection name.- Parameters:
index
- is the index of the pipeline stage whose connection name to get.- Returns:
- the name of the connection.
-
getPipelineStageDescription
java.lang.String getPipelineStageDescription(int index)
Get a specific pipeline stage description.- Parameters:
index
- is the index of the pipeline stage whose description to get.- Returns:
- the name of the connection.
-
getPipelineStageSpecification
Specification getPipelineStageSpecification(int index)
Get a specific pipeline stage specification.- Parameters:
index
- is the index of the pipeline stage whose specification is needed.- Returns:
- the specification for the connection.
-
deletePipelineStage
void deletePipelineStage(int index)
Delete a pipeline stage.- Parameters:
index
- is the index of the pipeline stage to delete.
-
insertPipelineStage
Specification insertPipelineStage(int index, boolean isOutput, java.lang.String pipelineStageConnectionName, java.lang.String pipelineStageDescription)
Insert a new pipeline stage.- Parameters:
index
- is the index to insert pipeline stage beforepipelineStageConnectionName
- is the connection name.pipelineStageDescription
- is the description.- Returns:
- the newly-created output specification.
-
clearNotifications
void clearNotifications()
Clear notification connections.
-
addNotification
Specification addNotification(java.lang.String notificationConnectionName, java.lang.String notificationDescription)
Add a notification.- Parameters:
notificationConnectionName
- is the name of the notification connection to add.notificationDescription
- is a description of the notification being added.- Returns:
- the empty specification for this notification.
-
countNotifications
int countNotifications()
Get a count of pipeline connections.- Returns:
- the current number of pipeline connections.
-
getNotificationConnectionName
java.lang.String getNotificationConnectionName(int index)
Get a specific notification connection name.- Parameters:
index
- is the index of the notification whose connection name to get.- Returns:
- the name of the connection.
-
getNotificationDescription
java.lang.String getNotificationDescription(int index)
Get a specific notification description.- Parameters:
index
- is the index of the notification whose description to get.- Returns:
- the name of the connection.
-
getNotificationSpecification
Specification getNotificationSpecification(int index)
Get a specific notification specification.- Parameters:
index
- is the index of the notification whose specification is needed.- Returns:
- the specification for the connection.
-
deleteNotification
void deleteNotification(int index)
Delete a notification.- Parameters:
index
- is the index of the notification to delete.
-
insertNotification
Specification insertNotification(int index, java.lang.String notificationConnectionName, java.lang.String notificationDescription)
Insert a new notification.- Parameters:
index
- is the index to insert pipeline stage beforenotificationConnectionName
- is the connection name.notificationDescription
- is the description.- Returns:
- the newly-created output specification.
-
setType
void setType(int type)
Set the job type.- Parameters:
type
- is the type (as an integer).
-
getType
int getType()
Get the job type.- Returns:
- the type (as an integer).
-
setStartMethod
void setStartMethod(int startMethod)
Set the job's start method.- Parameters:
startMethod
- is the start description.
-
getStartMethod
int getStartMethod()
Get the job's start method.- Returns:
- the start method.
-
clearScheduleRecords
void clearScheduleRecords()
Clear all the scheduling records.
-
addScheduleRecord
void addScheduleRecord(ScheduleRecord record)
Add a record.- Parameters:
record
- is the record to add.
-
getScheduleRecordCount
int getScheduleRecordCount()
Get the number of schedule records.- Returns:
- the count.
-
getScheduleRecord
ScheduleRecord getScheduleRecord(int index)
Get a specified schedule record.- Parameters:
index
- is the record number.- Returns:
- the record.
-
deleteScheduleRecord
void deleteScheduleRecord(int index)
Delete a specified schedule record.- Parameters:
index
- is the record number.
-
setInterval
void setInterval(java.lang.Long interval)
Set the rescheduling interval, in milliseconds, or null if forever.- Parameters:
interval
- is the default interval.
-
getInterval
java.lang.Long getInterval()
Get the rescheduling interval, in milliseconds.- Returns:
- the default interval, or null if forever.
-
setMaxInterval
void setMaxInterval(java.lang.Long interval)
Set the maximum rescheduling interval, in milliseconds, or null if forever.- Parameters:
interval
- is the maximum interval.
-
getMaxInterval
java.lang.Long getMaxInterval()
Get the maximum rescheduling interval, in milliseconds.- Returns:
- the max interval, or null if forever.
-
setExpiration
void setExpiration(java.lang.Long time)
Set the expiration time, in milliseconds.- Parameters:
time
- is the maximum expiration time of a document, in milliseconds, or null if none.
-
getExpiration
java.lang.Long getExpiration()
Get the expiration time, in milliseconds.- Returns:
- the maximum expiration time of a document, or null if none.
-
setReseedInterval
void setReseedInterval(java.lang.Long interval)
Set the reseeding interval, in milliseconds.- Parameters:
interval
- is the interval, or null for infinite.
-
getReseedInterval
java.lang.Long getReseedInterval()
Get the reseeding interval, in milliseconds.- Returns:
- the interval, or null if infinite.
-
getSpecification
Specification getSpecification()
Get the document specification (which can be modified).- Returns:
- the specification.
-
setPriority
void setPriority(int priority)
Set the job priority. This is a simple integer between 1 and 10, where 1 is the highest priority.- Parameters:
priority
- is the priority.
-
getPriority
int getPriority()
Get the job priority.- Returns:
- the priority (a number between 1 and 10).
-
getHopCountFilters
java.util.Map getHopCountFilters()
Get the set of hopcount filters the job has defined.- Returns:
- the set as a map, keyed by Strings and containing Longs.
-
clearHopCountFilters
void clearHopCountFilters()
Clear the set of hopcount filters for the job.
-
addHopCountFilter
void addHopCountFilter(java.lang.String linkType, java.lang.Long maxHops)
Add a hopcount filter to the job.- Parameters:
linkType
- is the type of link the filter applies to.maxHops
- is the maximum hop count. Use null to remove a filter.
-
getHopcountMode
int getHopcountMode()
Get the hopcount mode.
-
setHopcountMode
void setHopcountMode(int mode)
Set the hopcount mode.
-
-