@Entity public class IndexTask extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
STATUS_COMPLETE
IndexTask processing status to represent a task that has successfully
completed.
|
static String |
STATUS_FAILED
IndexTask processing status to represent a task that has failed
processing.
|
static String |
STATUS_IN_PROCESS
IndexTask processing status to represent task currently being processed.
|
static String |
STATUS_NEW
IndexTask processing status of new, unprocessed.
|
Constructor and Description |
---|
IndexTask() |
IndexTask(org.dataone.service.types.v2.SystemMetadata smd,
String objectPath)
Construct an IndexTask for the given SystemMetadata and objectPath
information.
|
Modifier and Type | Method and Description |
---|---|
static IndexTask |
deserialize(byte[] objectBytes) |
long |
getDateSysMetaModified() |
String |
getFormatId() |
Long |
getId() |
long |
getNextExecution() |
String |
getObjectPath() |
String |
getPid() |
int |
getPriority()
Private method exposed due to JPA and unit testing requirements.
|
String |
getStatus() |
String |
getSysMetadata() |
String |
getTaskModDateString() |
long |
getTaskModifiedDate() |
int |
getTryCount() |
int |
getVersion() |
boolean |
isDeleted() |
boolean |
isDeleteTask()
Does this task represent a removal from the search index.
|
void |
markFailed() |
void |
markInProgress() |
void |
markNew() |
byte[] |
serialize() |
void |
setAddPriority()
Assign add priority to this IndexTask.
|
void |
setDateSysMetaModified(long dateSysMetaModified) |
void |
setDeleted(boolean deleted) |
void |
setFormatId(String formatid) |
void |
setId(Long id) |
void |
setNextExection(long next) |
void |
setObjectPath(String objectPath) |
void |
setPid(String pid) |
void |
setPriority(int priority)
Private method exposed due to JPA and unit testing requirements.
|
void |
setStatus(String status)
Do not use this method, used by unit tests only.
|
void |
setSysMetadata(String sysMetadata) |
void |
setTaskModifiedDate(long taskModifiedDate) |
void |
setTryCount(int count) |
void |
setUpdatePriority()
Assign update priority to this IndexTask.
|
void |
setVersion(int version) |
String |
toString() |
protected org.dataone.service.types.v2.SystemMetadata |
unMarshalSystemMetadata() |
public static final String STATUS_NEW
public static final String STATUS_IN_PROCESS
public static final String STATUS_COMPLETE
public static final String STATUS_FAILED
public IndexTask()
public IndexTask(org.dataone.service.types.v2.SystemMetadata smd, String objectPath)
smd
- objectPath
- protected org.dataone.service.types.v2.SystemMetadata unMarshalSystemMetadata() throws org.dataone.exceptions.MarshallingException
org.dataone.exceptions.MarshallingException
public boolean isDeleteTask() throws org.dataone.exceptions.MarshallingException
org.dataone.exceptions.MarshallingException
public Long getId()
public void setId(Long id)
public String getPid()
public void setPid(String pid)
public boolean isDeleted()
public void setDeleted(boolean deleted)
public String getFormatId()
public void setFormatId(String formatid)
public String getSysMetadata()
public void setSysMetadata(String sysMetadata)
public String getObjectPath()
public void setObjectPath(String objectPath)
public long getDateSysMetaModified()
public void setDateSysMetaModified(long dateSysMetaModified)
public long getNextExecution()
public void setNextExection(long next)
public int getTryCount()
public void setTryCount(int count)
public int getPriority()
public void setPriority(int priority)
public void setUpdatePriority()
public void setAddPriority()
public long getTaskModifiedDate()
public void setTaskModifiedDate(long taskModifiedDate)
public String getTaskModDateString()
public String getStatus()
public void setStatus(String status)
public void markInProgress()
public void markNew()
public void markFailed()
public int getVersion()
public void setVersion(int version)
public byte[] serialize() throws IOException
IOException
public static IndexTask deserialize(byte[] objectBytes) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2019. All rights reserved.