public class LocalDirectoryTransport extends Transport
LocalDirectoryTransport.java
Writes Journal files to a local disk directory. It requires these parameters:
Transport.State| Modifier and Type | Field and Description |
|---|---|
static String |
PARAMETER_DIRECTORY_PATH |
crucial, parameters, parent| Constructor and Description |
|---|
LocalDirectoryTransport(Map<String,String> parameters,
boolean crucial,
TransportParent parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile()
On a request to close the file,
check that we are in a valid state,
close the
XMLEventWriter and the TransportOutputFile,
set the state.
|
XMLEventWriter |
getWriter()
Check that our current state is correct before filling a request for an
XMLEventWriter. |
void |
openFile(String repositoryHash,
String filename,
Date currentDate)
On a request to open the file,
check that we are in a valid state,
create the file,
create the
XMLEventWriter for use on the file,
ask the parent to write the header to the file,
set the state.
|
void |
shutdown()
On a request to shut down,
check that we are in a valid state,
set the state.
If we have already shut down, a second call is not an error, but requires
no action.
|
getState, isCrucial, setState, testStateChange, testWriterStatepublic static final String PARAMETER_DIRECTORY_PATH
public LocalDirectoryTransport(Map<String,String> parameters, boolean crucial, TransportParent parent) throws JournalException
JournalExceptionpublic void openFile(String repositoryHash, String filename, Date currentDate) throws JournalException
XMLEventWriter for use on the file,openFile in class TransportJournalExceptionpublic XMLEventWriter getWriter() throws JournalException
XMLEventWriter.getWriter in class TransportJournalExceptionpublic void closeFile()
throws JournalException
XMLEventWriter and the TransportOutputFile,closeFile in class TransportJournalExceptionpublic void shutdown()
throws JournalException
shutdown in class TransportJournalExceptionCopyright © 2013 DuraSpace. All Rights Reserved.