org.fcrepo.server.journal.readerwriter.multicast
Class LocalDirectoryTransport
java.lang.Object
org.fcrepo.server.journal.readerwriter.multicast.Transport
org.fcrepo.server.journal.readerwriter.multicast.LocalDirectoryTransport
public class LocalDirectoryTransport
- extends Transport
LocalDirectoryTransport.java
Writes Journal files to a local disk directory. It requires these parameters:
- directoryPath - full path to the directory where the Journals will be
stored.
- Version:
- $Id: LocalDirectoryTransport.java,v 1.1 2007/03/06 15:02:58 jblake
Exp $
- Author:
- jblake
| Nested classes/interfaces inherited from class org.fcrepo.server.journal.readerwriter.multicast.Transport |
Transport.State |
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAMETER_DIRECTORY_PATH
public static final String PARAMETER_DIRECTORY_PATH
- See Also:
- Constant Field Values
LocalDirectoryTransport
public LocalDirectoryTransport(Map<String,String> parameters,
boolean crucial,
TransportParent parent)
throws JournalException
- Throws:
JournalException
openFile
public void openFile(String repositoryHash,
String filename,
Date currentDate)
throws JournalException
- 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.
- Specified by:
openFile in class Transport
- Throws:
JournalException
getWriter
public XMLEventWriter getWriter()
throws JournalException
- Check that our current state is correct before filling a request for an
XMLEventWriter.
- Specified by:
getWriter in class Transport
- Throws:
JournalException
closeFile
public void closeFile()
throws JournalException
- On a request to close the file,
- Specified by:
closeFile in class Transport
- Throws:
JournalException
shutdown
public void shutdown()
throws JournalException
- 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.
- Specified by:
shutdown in class Transport
- Throws:
JournalException
Copyright © 2012 DuraSpace. All Rights Reserved.