public interface ChangeJournal extends ChangeSetListener
ChangeSet
instances.Modifier and Type | Interface and Description |
---|---|
static interface |
ChangeJournal.Records
An
Iterable extension which provides information about the number of entries the underlying collection holds. |
Modifier and Type | Method and Description |
---|---|
void |
addRecords(JournalRecord... records)
Adds one or more journal records to a journal.
|
ChangeJournal.Records |
allRecords(boolean descendingOrder)
Returns all the records this journal holds
|
Iterator<NodeKey> |
changedNodesSince(long timestamp)
Returns the node keys which are part of change sets that are newer or equal to a given timestamp.
|
String |
journalId()
Returns the id of this change journal.
|
JournalRecord |
lastRecord()
Returns the last record from the journal.
|
ChangeJournal.Records |
recordsNewerThan(LocalDateTime changeSetTime,
boolean inclusive,
boolean descendingOrder)
Returns all records that have changesets which are newer than a given timestamp.
|
void |
removeOldRecords()
Removes older entries.
|
void |
shutdown()
Stops the journal.
|
void |
start()
Starts this journal instance.
|
boolean |
started()
Checks if this journal is active (i.e. can accept requests) or not.
|
notify
void start() throws Exception
Exception
- if anything fails during startvoid shutdown()
void removeOldRecords()
ChangeJournal.Records allRecords(boolean descendingOrder)
descendingOrder
- flag which indicates whether the entriesChangeJournal.Records
instanceJournalRecord lastRecord()
JournalRecord
instance or null
if the journal is empty.ChangeJournal.Records recordsNewerThan(LocalDateTime changeSetTime, boolean inclusive, boolean descendingOrder)
changeSetTime
- the LocalDateTime
of the changes representing the lower bound; may be null indicating
that *all the records* should be returned.inclusive
- flag indicating whether the timestamp should be used inclusively or exclusivelydescendingOrder
- flag indicating if the records should be returned in ascending order (oldest to newest) or
descending order (newest to oldest)ChangeJournal.Records
instance; never null
Iterator<NodeKey> changedNodesSince(long timestamp)
void addRecords(JournalRecord... records)
records
- a JournalRecord
array.boolean started()
true
if the journal has started, false otherwise
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.