Package org.nasutekds.server.replication.service

Examples of org.nasutekds.server.replication.service.ReplicationBroker.publish()


        AddMsg addMsg =
          new AddMsg(gen.newChangeNumber(), addDn, stringUID(sequence+1),
                     stringUID(1),
                     entry.getObjectClassAttribute(),
                     entry.getAttributes(), null );
        broker.publish(addMsg);

        // rename the entry
        ModifyDNMsg moddnMsg =
          new ModifyDNMsg(addDn, gen.newChangeNumber(), stringUID(sequence+1),
                          stringUID(1), true, null, "dc=new_dep" + sequence);
View Full Code Here


        // rename the entry
        ModifyDNMsg moddnMsg =
          new ModifyDNMsg(addDn, gen.newChangeNumber(), stringUID(sequence+1),
                          stringUID(1), true, null, "dc=new_dep" + sequence);
        broker.publish(moddnMsg);
      }

      // configure and start replication of TEST_ROOT_DN_STRING on the server
      SortedSet<String> replServers = new TreeSet<String>();
      replServers.add("localhost:"+replServerPort);
View Full Code Here

      {
        addDn = "dc=new_dep" + sequence + "," + TEST_ROOT_DN_STRING;
        DeleteMsg delMsg = new DeleteMsg(addDn.toString(),
                                         gen.newChangeNumber(),
                                         stringUID(sequence + 1));
        broker.publish(delMsg);
      }
    }
    finally
    {
      if (replServer != null)
View Full Code Here

    {
      ChangeNumberGenerator gen = new ChangeNumberGenerator( 2, 0);

      ModifyMsg modMsg = new ModifyMsg(gen.newChangeNumber(),
        baseDn, rcvdMods, "cn=schema");
      broker.publish(modMsg);

      boolean found = checkEntryHasAttribute(baseDn, "attributetypes",
        "( 2.5.44.77.33 NAME 'dummy' )",
        10000, true);
View Full Code Here

    // 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.
    found = checkEntryHasAttribute(personWithUUIDEntry.getDN(),
                                   "description", "Description was changed",
                                   10000, true);
View Full Code Here

    // 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,
        "The DELETE replication message was not replayed");
View Full Code Here

    Attribute attr = Attributes.create(attrType, "B");
    Modification mod = new Modification(ModificationType.REPLACE, attr);
    List<Modification> mods = new ArrayList<Modification>(1);
    mods.add(mod);
    ModifyMsg modMsg = new ModifyMsg(t2, dn1, mods, entryuuid);
    broker.publish(modMsg);

    Thread.sleep(2000);

    // Replay an add of a value A at time t1 on a first server.
    attr = Attributes.create(attrType, "A");
View Full Code Here

    attr = Attributes.create(attrType, "A");
    mod = new Modification(ModificationType.ADD, attr);
    mods = new ArrayList<Modification>(1);
    mods.add(mod);
    modMsg = new ModifyMsg(t1, dn1, mods, entryuuid);
    broker.publish(modMsg);

    Thread.sleep(2000);

    // Read the entry to see how the conflict was resolved.
    entry = DirectoryServer.getEntry(dn1);
View Full Code Here

    attr = Attributes.empty(attrType);
    mod = new Modification(ModificationType.DELETE, attr);
    mods = new ArrayList<Modification>(1);
    mods.add(mod);
    modMsg = new ModifyMsg(t2, dn1, mods, entryuuid);
    broker.publish(modMsg);

    Thread.sleep(2000);

    // Replay a replace of a value A at time t1 on a first server.
    attr = Attributes.create(attrType, "A");
View Full Code Here

    attr = Attributes.create(attrType, "A");
    mod = new Modification(ModificationType.REPLACE, attr);
    mods = new ArrayList<Modification>(1);
    mods.add(mod);
    modMsg = new ModifyMsg(t1, dn1, mods, entryuuid);
    broker.publish(modMsg);

    Thread.sleep(2000);

    // Read the entry to see how the conflict was resolved.
    entry = DirectoryServer.getEntry(dn1);
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.