|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EventFileResolver
Interface that allows basic access to InputStreams and appending OutputStreams to event logs for aggregates.
The streams provided by these methods should be closed by the caller when it has finished using them.
| Method Summary | |
|---|---|
boolean |
eventFileExists(String type,
Object aggregateIdentifier)
Indicates whether there is a file containing (regular) events for the given aggregateIdentifier of
given type. |
InputStream |
openEventFileForReading(String type,
Object aggregateIdentifier)
Provides an input stream to the (regular) events file for the aggregate with the given aggregateIdentifier and of given type. |
OutputStream |
openEventFileForWriting(String type,
Object aggregateIdentifier)
Provides an output stream to the (regular) events file for the aggregate with the given aggregateIdentifier and of given type. |
InputStream |
openSnapshotFileForReading(String type,
Object aggregateIdentifier)
Provides an input stream to the snapshot events file for the aggregate with the given aggregateIdentifier and of given type. |
OutputStream |
openSnapshotFileForWriting(String type,
Object aggregateIdentifier)
Provides an output stream to the snapshot events file for the aggregate with the given aggregateIdentifier and of given type. |
boolean |
snapshotFileExists(String type,
Object aggregateIdentifier)
Indicates whether there is a file containing snapshot events for the given aggregateIdentifier of
given type. |
| Method Detail |
|---|
OutputStream openEventFileForWriting(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier and of given type. Written bytes are appended to already existing
information.
The caller of this method is responsible for closing the output stream when all data has been written to it.
type - The type of aggregate to open the stream foraggregateIdentifier - the identifier of the aggregate
IOException - when an error occurs while opening a file
OutputStream openSnapshotFileForWriting(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier and of given type. Written bytes are appended to already existing
information.
The caller of this method is responsible for closing the output stream when all data has been written to it.
type - The type of aggregate to open the stream foraggregateIdentifier - the identifier of the aggregate
IOException - when an error occurs while opening a file
InputStream openEventFileForReading(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier and of given type.
The caller of this method is responsible for closing the input stream when done reading from it.
type - The type of aggregate to open the stream foraggregateIdentifier - the identifier of the aggregate
IOException - when an error occurs while opening a file
InputStream openSnapshotFileForReading(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier and of given type.
The caller of this method is responsible for closing the input stream when done reading from it.
type - The type of aggregate to open the stream foraggregateIdentifier - the identifier of the aggregate
IOException - when an error occurs while opening a file
boolean eventFileExists(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier of
given type.
type - The type of aggregateaggregateIdentifier - the identifier of the aggregate
true if an event log exists for the aggregate, false otherwise.
IOException - when an error occurs while reading from the FileSystem. The existence of the event file is
undetermined.
boolean snapshotFileExists(String type,
Object aggregateIdentifier)
throws IOException
aggregateIdentifier of
given type.
type - The type of aggregateaggregateIdentifier - the identifier of the aggregate
true if a snapshot event log exists for the aggregate, false otherwise.
IOException - when an error occurs while reading from the FileSystem. The existence of the event file is
undetermined.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||