org.apache.directory.server.ldap.replication.provider
Class ReplicaJournalCursor

java.lang.Object
  extended by org.apache.directory.api.ldap.model.cursor.AbstractCursor<ReplicaEventMessage>
      extended by org.apache.directory.server.ldap.replication.provider.ReplicaJournalCursor
All Implemented Interfaces:
Iterable<ReplicaEventMessage>, org.apache.directory.api.ldap.model.cursor.Cursor<ReplicaEventMessage>

public class ReplicaJournalCursor
extends org.apache.directory.api.ldap.model.cursor.AbstractCursor<ReplicaEventMessage>

Define a cursor on top of a replication journal.

Author:
Apache Directory Project

Constructor Summary
ReplicaJournalCursor(org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable<String,ReplicaEventMessage> journal, String consumerCsn)
          Creates a cursor on top of the given journal
 
Method Summary
 void after(ReplicaEventMessage arg0)
          
 void afterLast()
          
 boolean available()
          
 void before(ReplicaEventMessage arg0)
          
 void beforeFirst()
          
 void close()
          
 void close(Exception cause)
          
protected  void delete()
          delete the current message used for internal log cleanup ONLY
 boolean first()
          
 ReplicaEventMessage get()
          
 Iterator<ReplicaEventMessage> iterator()
          
 boolean last()
          
 boolean next()
          
 boolean previous()
          
protected  void skipQualifyingWhileFetching()
          sets the flag to skip CSN based checking while traversing used for internal log cleanup ONLY
 
Methods inherited from class org.apache.directory.api.ldap.model.cursor.AbstractCursor
checkNotClosed, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, setClosureMonitor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicaJournalCursor

public ReplicaJournalCursor(org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmTable<String,ReplicaEventMessage> journal,
                            String consumerCsn)
                     throws Exception
Creates a cursor on top of the given journal

Parameters:
journal - the log journal
consumerCsn - the consumer's CSN taken from cookie
Throws:
Exception
Method Detail

after

public void after(ReplicaEventMessage arg0)
           throws org.apache.directory.api.ldap.model.exception.LdapException,
                  org.apache.directory.api.ldap.model.cursor.CursorException,
                  IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

afterLast

public void afterLast()
               throws org.apache.directory.api.ldap.model.exception.LdapException,
                      org.apache.directory.api.ldap.model.cursor.CursorException,
                      IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

available

public boolean available()


before

public void before(ReplicaEventMessage arg0)
            throws org.apache.directory.api.ldap.model.exception.LdapException,
                   org.apache.directory.api.ldap.model.cursor.CursorException,
                   IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

beforeFirst

public void beforeFirst()
                 throws org.apache.directory.api.ldap.model.exception.LdapException,
                        org.apache.directory.api.ldap.model.cursor.CursorException,
                        IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

first

public boolean first()
              throws org.apache.directory.api.ldap.model.exception.LdapException,
                     org.apache.directory.api.ldap.model.cursor.CursorException,
                     IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

get

public ReplicaEventMessage get()
                        throws org.apache.directory.api.ldap.model.cursor.CursorException

Throws:
org.apache.directory.api.ldap.model.cursor.CursorException

last

public boolean last()
             throws org.apache.directory.api.ldap.model.exception.LdapException,
                    org.apache.directory.api.ldap.model.cursor.CursorException,
                    IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

next

public boolean next()
             throws org.apache.directory.api.ldap.model.exception.LdapException,
                    org.apache.directory.api.ldap.model.cursor.CursorException,
                    IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

previous

public boolean previous()
                 throws org.apache.directory.api.ldap.model.exception.LdapException,
                        org.apache.directory.api.ldap.model.cursor.CursorException,
                        IOException

Throws:
org.apache.directory.api.ldap.model.exception.LdapException
org.apache.directory.api.ldap.model.cursor.CursorException
IOException

close

public void close()

Specified by:
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<ReplicaEventMessage>
Overrides:
close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<ReplicaEventMessage>

close

public void close(Exception cause)

Specified by:
close in interface org.apache.directory.api.ldap.model.cursor.Cursor<ReplicaEventMessage>
Overrides:
close in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<ReplicaEventMessage>

skipQualifyingWhileFetching

protected void skipQualifyingWhileFetching()
sets the flag to skip CSN based checking while traversing used for internal log cleanup ONLY


delete

protected void delete()
delete the current message used for internal log cleanup ONLY


iterator

public Iterator<ReplicaEventMessage> iterator()

Specified by:
iterator in interface Iterable<ReplicaEventMessage>
Overrides:
iterator in class org.apache.directory.api.ldap.model.cursor.AbstractCursor<ReplicaEventMessage>


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.