| | |
| | | |
| | | private ReplicationServerListener replicationServerListener; |
| | | private static final Map<DN, LDAPReplicationDomain> domains = new ConcurrentHashMap<>(4); |
| | | /** |
| | | * Shared stateless "continue processing" result: the provider hooks run for |
| | | * every operation, so avoid allocating a fresh result each time. |
| | | */ |
| | | private static final SynchronizationProviderResult CONTINUE = |
| | | new SynchronizationProviderResult.ContinueProcessing(); |
| | | private static final DSRSShutdownSync dsrsShutdownSync = new DSRSShutdownSync(); |
| | | /** The queue of received update messages, to be treated by the ReplayThread threads. */ |
| | | private static final BlockingQueue<UpdateToReplay> updateToReplayQueue = new LinkedBlockingQueue<>(10000); |
| | |
| | | } |
| | | } |
| | | |
| | | if (domains.isEmpty()) |
| | | { |
| | | // The Multimaster Synchronization provider is enabled by default even |
| | | // on standalone servers with no replication domain configured: skip |
| | | // the walk to the suffix that every write operation would otherwise |
| | | // pay three times (conflict resolution, pre- and post-operation). |
| | | return null; |
| | | } |
| | | |
| | | LDAPReplicationDomain domain = null; |
| | | DN temp = dn; |
| | | BackendConfigManager backendConfigManager = |
| | |
| | | { |
| | | return domain.handleConflictResolution(modifyOperation); |
| | | } |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | { |
| | | return domain.handleConflictResolution(addOperation); |
| | | } |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | { |
| | | return domain.handleConflictResolution(deleteOperation); |
| | | } |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | { |
| | | return domain.handleConflictResolution(modifyDNOperation); |
| | | } |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | if (domain == null || !domain.solveConflict()) |
| | | { |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | EntryHistorical historicalInformation = (EntryHistorical) |
| | |
| | | ResultCode.SUCCESS, null); |
| | | } |
| | | |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | | public SynchronizationProviderResult doPreOperation( |
| | | PreOperationDeleteOperation deleteOperation) throws DirectoryException |
| | | { |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | if (domain == null || !domain.solveConflict()) |
| | | { |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | // The historical object is retrieved from the attachment created |
| | |
| | | // Add to the operation the historical attribute : "dn:changeNumber:moddn" |
| | | historicalInformation.setHistoricalAttrToOperation(modifyDNOperation); |
| | | |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |
| | |
| | | findDomain(addOperation.getEntryDN(), addOperation); |
| | | if (domain == null) |
| | | { |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | // For LOCAL op only, generate CSN and attach Context |
| | |
| | | // Add to the operation the historical attribute : "dn:changeNumber:add" |
| | | EntryHistorical.setHistoricalAttrToOperation(addOperation); |
| | | |
| | | return new SynchronizationProviderResult.ContinueProcessing(); |
| | | return CONTINUE; |
| | | } |
| | | |
| | | @Override |