Examples of newChangeNumber()


Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

     */
    ChangeNumberGenerator gen = new ChangeNumberGenerator( 2, 0);


    // Create and publish an update message to add an entry.
    AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN().toString(),
        user1entryUUID,
        baseUUID,
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

    assertNotNull(resultEntry,
        "The ADD replication message was not replayed");

    // Send a first modify operation message.
    List<Modification> mods = generatemods("telephonenumber", "01 02 45");
    ModifyMsg modMsg = new ModifyMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN(), mods,
        user1entryUUID);
    broker.publish(modMsg);

    // Check that the modify has been replayed.
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

    Thread.sleep(3000);
    HeartbeatThread.setHeartbeatsDisabled(false);

    // Send a second modify operation message.
    mods = generatemods("description", "Description was changed");
    modMsg = new ModifyMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN(), mods,
        user1entryUUID);
    broker.publish(modMsg);

    // Check that the modify has been replayed.
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

    }

    // Delete the entries to clean the database.
    DeleteMsg delMsg =
      new DeleteMsg(personWithUUIDEntry.getDN().toString(),
          gen.newChangeNumber(), user1entryUUID);
    broker.publish(delMsg);
    resultEntry = getEntry(personWithUUIDEntry.getDN(), 10000, false);

    // Check that the delete operation has been applied.
    assertNull(resultEntry,
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

     * To simulate this, create an entry with a given UUID and a given DN
     * then send a modify operation using another DN but the same UUID.
     * Finally check that the modify operation has been applied.
     */
    // create the entry with a given DN
    AddMsg addMsg = new AddMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN().toString(),
        user1entryUUID,
        baseUUID,
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

    assertNotNull(resultEntry,
        "The send ADD replication message was not applied");

    // send a modify operation with the correct unique ID but another DN
    List<Modification> mods = generatemods("telephonenumber", "01 02 45");
    ModifyMsg modMsg = new ModifyMsg(gen.newChangeNumber(),
        DN.decode("cn=something,ou=People," + TEST_ROOT_DN_STRING), mods,
        user1entryUUID);
    updateMonitorCount(baseDn, resolvedMonitorAttr);
    int AlertCount = DummyAlertHandler.getAlertCount();
    broker.publish(modMsg);
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

     * now the RDN of the entry and therefore should not be deleted.
     */
    // send a modify operation attempting to replace the RDN entry
    // with a new value
    mods = generatemods("uid", "AnotherUid");
    modMsg = new ModifyMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN(), mods,
        user1entryUUID);

    updateMonitorCount(baseDn, resolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

     * Finally check that the modify operation has not been applied to the
     * entry with the given DN.
     */

    //  create the entry with a given DN and unique ID
    addMsg = new AddMsg(gen.newChangeNumber(),
        personWithUUIDEntry.getDN().toString(),
        user1entryUUID, baseUUID,
        personWithUUIDEntry.getObjectClassAttribute(),
        personWithUUIDEntry.getAttributes(), new ArrayList<Attribute>());
    broker.publish(addMsg);
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

    assertNotNull(resultEntry,
        "The ADD replication message was not applied");

    // send a modify operation with a wrong unique ID but the same DN
    mods = generatemods("telephonenumber", "02 01 03 05");
    modMsg = new ModifyMsg(gen.newChangeNumber(),
        DN.decode(user1dn), mods, "10000000-9abc-def0-1234-1234567890ab");
    updateMonitorCount(baseDn, resolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
    broker.publish(modMsg);
View Full Code Here

Examples of org.nasutekds.server.replication.common.ChangeNumberGenerator.newChangeNumber()

     */
    // send a delete operation with a wrong dn but the unique ID of the entry
    // used above
    DeleteMsg delMsg =
      new DeleteMsg("cn=anotherdn,ou=People," + TEST_ROOT_DN_STRING,
          gen.newChangeNumber(), user1entryUUID);
    updateMonitorCount(baseDn, resolvedMonitorAttr);
    AlertCount = DummyAlertHandler.getAlertCount();
    broker.publish(delMsg);

    // check that the delete operation has been applied
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.