modDnControl.setNewRdn( renameContext.getNewRdn().getName() );
modDnControl.setDeleteOldRdn( renameContext.getDeleteOldRdn() );
if ( pushInRealTime )
{
SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
respEntry.setObjectName( entry.getDn() );
respEntry.setEntry( entry );
SyncStateValueDecorator syncModify = new SyncStateValueDecorator(
session.getLdapServer().getDirectoryService().getLdapCodecService() );
syncModify.setSyncStateType( SyncStateTypeEnum.MODDN );
syncModify.setEntryUUID( Strings.uuidToBytes(entry.get(SchemaConstants.ENTRY_UUID_AT)
.getString()) );
syncModify.setCookie( getCookie( renameContext.getModifiedEntry() ) );
respEntry.addControl( syncModify );
respEntry.addControl( modDnControl );
WriteFuture future = session.getIoSession().write( respEntry );
handleWriteFuture( future, renameContext.getModifiedEntry(), null, modDnControl );
}