Class ECLMultiDomainDBCursor
- java.lang.Object
-
- org.opends.server.replication.server.changelog.file.ECLMultiDomainDBCursor
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,DBCursor<UpdateRecord>
public final class ECLMultiDomainDBCursor extends Object implements DBCursor<UpdateRecord>
Multi domain DB cursor that only returns updates for the domains which have been enabled for the external changelog.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opends.server.replication.server.changelog.api.DBCursor
DBCursor.CursorOptions, DBCursor.PositionStrategy
-
-
Constructor Summary
Constructors Constructor Description ECLMultiDomainDBCursor(Predicate<Dn> isEclEnabledDomain, MultiDomainDBCursor cursor)
Builds an instance of this class filtering updates from the provided cursor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Release the resources and locks used by this Iterator.UpdateRecord
getRecord()
Getter for the current record.boolean
next()
Skip to the next record of the database.String
toString()
-
-
-
Constructor Detail
-
ECLMultiDomainDBCursor
public ECLMultiDomainDBCursor(Predicate<Dn> isEclEnabledDomain, MultiDomainDBCursor cursor)
Builds an instance of this class filtering updates from the provided cursor.- Parameters:
isEclEnabledDomain
- tells whether a domain is enabled for the external changelogcursor
- the cursor whose updates will be filtered
-
-
Method Detail
-
getRecord
public UpdateRecord getRecord()
Description copied from interface:DBCursor
Getter for the current record.This method will always return
null
when- a call to
DBCursor.next()
returnsfalse
- it is called before the very first call to
DBCursor.next()
.
- Specified by:
getRecord
in interfaceDBCursor<UpdateRecord>
- Returns:
- The current record. May be
null
.
- a call to
-
next
public boolean next() throws ChangelogException
Description copied from interface:DBCursor
Skip to the next record of the database.- Specified by:
next
in interfaceDBCursor<UpdateRecord>
- Returns:
- true if has next, false otherwise
- Throws:
ChangelogException
- When database exception raised.
-
close
public void close()
Description copied from interface:DBCursor
Release the resources and locks used by this Iterator. This method must be called when the iterator is no longer used. Failure to do it could cause DB deadlock.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceDBCursor<UpdateRecord>
-
-