| | |
| | | * </ol> |
| | | * <h6>Example</h6> |
| | | * <p> |
| | | * Given the following replica database for baseDN "dc=example,dc=com" and |
| | | * serverId 1: |
| | | * Given the following replica database for baseDN "dc=example,dc=com": |
| | | * |
| | | * <pre> |
| | | * CSN1 <= Oldest |
| | |
| | | * Then: |
| | | * |
| | | * <pre> |
| | | * assertEquals(getCount("dc=example,dc=com", 1, CSN1, CSN1), 1); |
| | | * assertEquals(getCount("dc=example,dc=com", 1, CSN1, CSN2), 2); |
| | | * assertEquals(getCount("dc=example,dc=com", 1, CSN1, CSN5), 5); |
| | | * assertEquals(getCount("dc=example,dc=com", 1, null, CSN5), 5); |
| | | * assertEquals(getCount("dc=example,dc=com", 1, CSN1, null), 0); |
| | | * assertEquals(getCount("dc=example,dc=com", 1, null, null), 5); |
| | | * assertEquals(getCount("dc=example,dc=com", CSN1, CSN1), 1); |
| | | * assertEquals(getCount("dc=example,dc=com", CSN1, CSN2), 2); |
| | | * assertEquals(getCount("dc=example,dc=com", CSN1, CSN5), 5); |
| | | * assertEquals(getCount("dc=example,dc=com", null, CSN5), 5); |
| | | * assertEquals(getCount("dc=example,dc=com", CSN1, null), 0); |
| | | * assertEquals(getCount("dc=example,dc=com", null, null), 5); |
| | | * </pre> |
| | | * |
| | | * @param baseDN |
| | | * the replication domain baseDN |
| | | * @param serverId |
| | | * the serverId on which to act |
| | | * @param from |
| | | * The older CSN where to start the count |
| | | * @param to |
| | | * The newer CSN where to end the count |
| | | * @return The computed number of changes |
| | | */ |
| | | long getCount(DN baseDN, int serverId, CSN from, CSN to); |
| | | long getCount(DN baseDN, CSN from, CSN to); |
| | | |
| | | /** |
| | | * Returns the {@link CSN} situated immediately after the specified |