| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011 ForgeRock AS |
| | | * Portions Copyright 2011-2012 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.server; |
| | | import org.opends.messages.MessageBuilder; |
| | |
| | | dbCloseLock = new ReentrantReadWriteLock(true); |
| | | |
| | | // |
| | | Cursor cursor = null; |
| | | Cursor cursor; |
| | | Transaction txn = null; |
| | | DatabaseEntry key = new DatabaseEntry(); |
| | | DatabaseEntry data = new DatabaseEntry(); |
| | |
| | | public ChangeNumber readFirstChange() |
| | | { |
| | | Cursor cursor = null; |
| | | String str = null; |
| | | ChangeNumber cn = null; |
| | | |
| | | try |
| | |
| | | return null; |
| | | } |
| | | |
| | | str = decodeUTF8(key.getData()); |
| | | String str = decodeUTF8(key.getData()); |
| | | cn = new ChangeNumber(str); |
| | | if (ReplicationDB.isaCounter(cn)) |
| | | { |
| | |
| | | @Override |
| | | public String toString() |
| | | { |
| | | return serverId + baseDn.toString(); |
| | | return serverId + baseDn; |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | // We can move close to the startingChangeNumber. |
| | | // Let's create a cursor from that point. |
| | | DatabaseEntry key = new DatabaseEntry(); |
| | | DatabaseEntry data = new DatabaseEntry(); |
| | | if (localCursor.getPrev(key, data, LockMode.DEFAULT) != |
| | | DatabaseEntry aKey = new DatabaseEntry(); |
| | | DatabaseEntry aData = new DatabaseEntry(); |
| | | if (localCursor.getPrev(aKey, aData, LockMode.DEFAULT) != |
| | | OperationStatus.SUCCESS) |
| | | { |
| | | localCursor.close(); |