DBCursor.CursorOptions, DBCursor.PositionStrategy
Constructor and Description |
---|
ReplicaCursor(DBCursor<UpdateMsg> cursor,
CSN offlineCSN,
ReplicaId replicaId,
ReplicationDomainDB domainDB)
Creates a ReplicaCursor object with a cursor to decorate and an offlineCSN to return as part of a
ReplicaOfflineMsg.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Release the resources and locks used by this Iterator.
|
UpdateMsg |
getRecord()
Getter for the current record.
|
ReplicaId |
getReplicaId()
Returns the replica identifier that this cursor is associated to.
|
boolean |
next()
Skip to the next record of the database.
|
void |
setOfflineCSN(CSN offlineCSN)
Sets the offline CSN to be returned by this cursor.
|
String |
toString() |
public ReplicaCursor(DBCursor<UpdateMsg> cursor, CSN offlineCSN, ReplicaId replicaId, ReplicationDomainDB domainDB)
cursor
- the non-null underlying cursor that needs to be exhausted before we return a ReplicaOfflineMsgofflineCSN
- the offline CSN from which to builder the ReplicaOfflineMsg
to returnreplicaId
- the replica identifierdomainDB
- the DB for the provided replication domainpublic void setOfflineCSN(CSN offlineCSN)
offlineCSN
- The offline CSN to be returned by this cursor. If null, it will unset any previous offlineCSN and
never return a ReplicaOfflineMsgpublic UpdateMsg getRecord()
DBCursor
This method will always return null
when
DBCursor.next()
returns false
DBCursor.next()
.public ReplicaId getReplicaId()
public boolean next() throws ChangelogException
DBCursor
next
in interface DBCursor<UpdateMsg>
ChangelogException
- When database exception raised.public void close()
DBCursor
Copyright 2010-2020 ForgeRock AS.