public class JournalConsumer extends Object implements JournalWorker
Create a JournalConsumerThread to process the journal. If any
calls to Management methods come in from outside, reject them.
| Constructor and Description |
|---|
JournalConsumer(Map<String,String> parameters,
String role,
ServerInterface server)
Get the appropriate JournalReader and JournalRecoveryLog, based on the
server parameters, and create a JournalConsumerThread that will process
the journal entries, using that reader and that logger.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addDatastream(Context context,
String pid,
String dsID,
String[] altIDs,
String dsLabel,
boolean versionable,
String MIMEType,
String formatURI,
String location,
String controlGroup,
String dsState,
String checksumType,
String checksum,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
boolean |
addRelationship(Context context,
String pid,
String relationship,
String objURI,
boolean isLiteral,
String datatype)
Reject API calls from outside while we are in recovery mode.
|
String |
compareDatastreamChecksum(Context context,
String pid,
String dsID,
Date versionDate)
Read-only method: pass the call to the
ManagementDelegate. |
InputStream |
export(Context context,
String pid,
String format,
String exportContext,
String encoding)
Read-only method: pass the call to the
ManagementDelegate. |
Datastream |
getDatastream(Context context,
String pid,
String datastreamID,
Date asOfDateTime)
Read-only method: pass the call to the
ManagementDelegate. |
Datastream[] |
getDatastreamHistory(Context context,
String pid,
String datastreamID)
Read-only method: pass the call to the
ManagementDelegate. |
Datastream[] |
getDatastreams(Context context,
String pid,
Date asOfDateTime,
String dsState)
Read-only method: pass the call to the
ManagementDelegate. |
String[] |
getNextPID(Context context,
int numPIDs,
String namespace)
Reject API calls from outside while we are in recovery mode.
|
InputStream |
getObjectXML(Context context,
String pid,
String encoding)
Read-only method: pass the call to the
ManagementDelegate. |
RelationshipTuple[] |
getRelationships(Context context,
String pid,
String relationship)
Read-only method: pass the call to the
ManagementDelegate. |
InputStream |
getTempStream(String id)
Delegate to the ManagementDelegate.
|
String |
ingest(Context context,
InputStream serialization,
String logMessage,
String format,
String encoding,
String pid)
Reject API calls from outside while we are in recovery mode.
|
Date |
modifyDatastreamByReference(Context context,
String pid,
String datastreamID,
String[] altIDs,
String dsLabel,
String mimeType,
String formatURI,
String dsLocation,
String checksumType,
String checksum,
String logMessage,
Date lastModifiedDate)
Reject API calls from outside while we are in recovery mode.
|
Date |
modifyDatastreamByValue(Context context,
String pid,
String datastreamID,
String[] altIDs,
String dsLabel,
String mimeType,
String formatURI,
InputStream dsContent,
String checksumType,
String checksum,
String logMessage,
Date lastModifiedDate)
Reject API calls from outside while we are in recovery mode.
|
Date |
modifyObject(Context context,
String pid,
String state,
String label,
String ownerId,
String logMessage,
Date lastModifiedDate)
Reject API calls from outside while we are in recovery mode.
|
Date[] |
purgeDatastream(Context context,
String pid,
String datastreamID,
Date startDT,
Date endDT,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
Date |
purgeObject(Context context,
String pid,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
boolean |
purgeRelationship(Context context,
String pid,
String relationship,
String objURI,
boolean isLiteral,
String datatype)
Reject API calls from outside while we are in recovery mode.
|
String |
putTempStream(Context context,
InputStream in)
Reject API calls from outside while we are in recovery mode.
|
Date |
setDatastreamState(Context context,
String pid,
String dsID,
String dsState,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
Date |
setDatastreamVersionable(Context context,
String pid,
String dsID,
boolean versionable,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
Date |
setDisseminatorState(Context context,
String pid,
String dsID,
String dsState,
String logMessage)
Reject API calls from outside while we are in recovery mode.
|
void |
setManagementDelegate(ManagementDelegate delegate)
Get the ManagementDelegate module and pass it to the
JournalConsumerThread, so it can start working.
|
void |
shutdown()
Tell the thread, the reader and the log to shut down.
|
Validation |
validate(Context context,
String pid,
Date asOfDateTime)
Reject API calls from outside while we are in recovery mode.
|
public JournalConsumer(Map<String,String> parameters, String role, ServerInterface server) throws ModuleInitializationException
ModuleInitializationExceptionpublic void setManagementDelegate(ManagementDelegate delegate)
setManagementDelegate in interface JournalWorkerpublic void shutdown()
throws ModuleShutdownException
shutdown in interface JournalWorkerModuleShutdownExceptionpublic String ingest(Context context, InputStream serialization, String logMessage, String format, String encoding, String pid) throws ServerException
ingest in interface ManagementServerExceptionpublic Date modifyObject(Context context, String pid, String state, String label, String ownerId, String logMessage, Date lastModifiedDate) throws ServerException
modifyObject in interface ManagementServerExceptionpublic Date purgeObject(Context context, String pid, String logMessage) throws ServerException
purgeObject in interface ManagementServerExceptionpublic String addDatastream(Context context, String pid, String dsID, String[] altIDs, String dsLabel, boolean versionable, String MIMEType, String formatURI, String location, String controlGroup, String dsState, String checksumType, String checksum, String logMessage) throws ServerException
addDatastream in interface ManagementServerExceptionpublic Date modifyDatastreamByReference(Context context, String pid, String datastreamID, String[] altIDs, String dsLabel, String mimeType, String formatURI, String dsLocation, String checksumType, String checksum, String logMessage, Date lastModifiedDate) throws ServerException
modifyDatastreamByReference in interface ManagementServerExceptionpublic Date modifyDatastreamByValue(Context context, String pid, String datastreamID, String[] altIDs, String dsLabel, String mimeType, String formatURI, InputStream dsContent, String checksumType, String checksum, String logMessage, Date lastModifiedDate) throws ServerException
modifyDatastreamByValue in interface ManagementServerExceptionpublic Date[] purgeDatastream(Context context, String pid, String datastreamID, Date startDT, Date endDT, String logMessage) throws ServerException
purgeDatastream in interface ManagementServerExceptionpublic String putTempStream(Context context, InputStream in) throws ServerException
putTempStream in interface ManagementServerExceptionpublic Date setDatastreamState(Context context, String pid, String dsID, String dsState, String logMessage) throws ServerException
setDatastreamState in interface ManagementServerExceptionpublic Date setDatastreamVersionable(Context context, String pid, String dsID, boolean versionable, String logMessage) throws ServerException
setDatastreamVersionable in interface ManagementServerExceptionpublic Date setDisseminatorState(Context context, String pid, String dsID, String dsState, String logMessage) throws ServerException
ServerExceptionpublic String[] getNextPID(Context context, int numPIDs, String namespace) throws ServerException
getNextPID in interface ManagementServerExceptionpublic boolean addRelationship(Context context, String pid, String relationship, String objURI, boolean isLiteral, String datatype) throws ServerException
addRelationship in interface ManagementServerExceptionpublic boolean purgeRelationship(Context context, String pid, String relationship, String objURI, boolean isLiteral, String datatype) throws ServerException
purgeRelationship in interface ManagementServerExceptionpublic Validation validate(Context context, String pid, Date asOfDateTime) throws ServerException
validate in interface ManagementServerExceptionpublic String compareDatastreamChecksum(Context context, String pid, String dsID, Date versionDate) throws ServerException
ManagementDelegate.compareDatastreamChecksum in interface ManagementServerExceptionpublic InputStream export(Context context, String pid, String format, String exportContext, String encoding) throws ServerException
ManagementDelegate.export in interface ManagementServerExceptionpublic InputStream getObjectXML(Context context, String pid, String encoding) throws ServerException
ManagementDelegate.getObjectXML in interface ManagementServerExceptionpublic Datastream getDatastream(Context context, String pid, String datastreamID, Date asOfDateTime) throws ServerException
ManagementDelegate.getDatastream in interface ManagementServerExceptionpublic Datastream[] getDatastreams(Context context, String pid, Date asOfDateTime, String dsState) throws ServerException
ManagementDelegate.getDatastreams in interface ManagementServerExceptionpublic Datastream[] getDatastreamHistory(Context context, String pid, String datastreamID) throws ServerException
ManagementDelegate.getDatastreamHistory in interface ManagementServerExceptionpublic RelationshipTuple[] getRelationships(Context context, String pid, String relationship) throws ServerException
ManagementDelegate.getRelationships in interface ManagementServerExceptionpublic InputStream getTempStream(String id) throws ServerException
getTempStream in interface ManagementServerExceptionCopyright © 2013 DuraSpace. All Rights Reserved.