| | |
| | | // Replay a replace of a value B at time t2 on a second server. |
| | | Attribute attr = Attributes.create(attrType, "B"); |
| | | Modification mod = new Modification(ModificationType.REPLACE, attr); |
| | | List<Modification> mods = new ArrayList<Modification>(1); |
| | | List<Modification> mods = new ArrayList<>(1); |
| | | mods.add(mod); |
| | | ModifyMsg modMsg = new ModifyMsg(t2, dn1, mods, entryuuid); |
| | | broker.publish(modMsg); |
| | |
| | | // Replay an add of a value A at time t1 on a first server. |
| | | attr = Attributes.create(attrType, "A"); |
| | | mod = new Modification(ModificationType.ADD, attr); |
| | | mods = new ArrayList<Modification>(1); |
| | | mods = new ArrayList<>(1); |
| | | mods.add(mod); |
| | | modMsg = new ModifyMsg(t1, dn1, mods, entryuuid); |
| | | broker.publish(modMsg); |
| | |
| | | // Replay an delete of attribute displayname at time t2 on a second server. |
| | | attr = Attributes.empty(attrType); |
| | | mod = new Modification(ModificationType.DELETE, attr); |
| | | mods = new ArrayList<Modification>(1); |
| | | mods = new ArrayList<>(1); |
| | | mods.add(mod); |
| | | modMsg = new ModifyMsg(t2, dn1, mods, entryuuid); |
| | | broker.publish(modMsg); |
| | |
| | | // Replay a replace of a value A at time t1 on a first server. |
| | | attr = Attributes.create(attrType, "A"); |
| | | mod = new Modification(ModificationType.REPLACE, attr); |
| | | mods = new ArrayList<Modification>(1); |
| | | mods = new ArrayList<>(1); |
| | | mods.add(mod); |
| | | modMsg = new ModifyMsg(t1, dn1, mods, entryuuid); |
| | | broker.publish(modMsg); |
| | |
| | | */ |
| | | private void consumeAllMessages(ReplicationBroker broker) |
| | | { |
| | | final List<ReplicationMsg> msgs = new ArrayList<ReplicationMsg>(); |
| | | final List<ReplicationMsg> msgs = new ArrayList<>(); |
| | | try |
| | | { |
| | | while (true) |