* @throws Exception If the update failed
*/
public void updateReplicaLastSentCsn( ReplicaEventLog replica ) throws Exception
{
Modification mod = modMap.get( replica.getId() );
Attribute lastSentCsnAt = null;
if ( mod == null )
{
mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, ADS_REPL_LAST_SENT_CSN_AT,
replica.getLastSentCsn() );
modMap.put( replica.getId(), mod );
}
else
{
lastSentCsnAt = mod.getAttribute();
lastSentCsnAt.clear(); // clearing is mandatory
lastSentCsnAt.add( replica.getLastSentCsn() );
}
Dn dn = directoryService.getDnFactory().create(
SchemaConstants.ADS_DS_REPLICA_ID + "=" + replica.getId() + "," + REPL_CONSUMER_DN );
adminSession.modify( dn, mod );