| | |
| | | * |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | * Portions Copyright 2011-2015 ForgeRock AS |
| | | */ |
| | | package org.opends.server.replication.plugin; |
| | | |
| | |
| | | private ReplicationBroker ds2; |
| | | private ReplicationBroker ds3; |
| | | private ReplicationServer rs1; |
| | | /** The tracer object for the debug logger */ |
| | | /** The tracer object for the debug logger. */ |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | private final int initWindow = 100; |
| | | |
| | |
| | | |
| | | /** |
| | | * Creates and starts a new ReplicationDomain configured for the replication |
| | | * server |
| | | * server. |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | private LDAPReplicationDomain createReplicationDomain(int dsId) throws Exception |
| | |
| | | |
| | | /** |
| | | * Create and connect a replication broker to the replication server with the |
| | | * given state and generation id |
| | | * given state and generation id. |
| | | */ |
| | | private ReplicationBroker createReplicationBroker(int dsId, |
| | | ServerState state, long generationId) throws Exception |
| | |
| | | } |
| | | } |
| | | |
| | | /** Returns various init values for test testStateMachineStatusAnalyzer */ |
| | | /** Returns various init values for test testStateMachineStatusAnalyzer. */ |
| | | @DataProvider(name="stateMachineStatusAnalyzerTestProvider") |
| | | public Object [][] stateMachineStatusAnalyzerTestProvider() throws Exception |
| | | { |
| | |
| | | |
| | | /** |
| | | * Sends a reset genid message through the given replication broker, with the |
| | | * given new generation id |
| | | * given new generation id. |
| | | */ |
| | | private void resetGenId(ReplicationBroker rb, long newGenId) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Initializes a full update session by sending InitializeTargetMsg |
| | | * Initializes a full update session by sending InitializeTargetMsg. |
| | | */ |
| | | public void initFullUpdate(int destId, long nEntries) |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Stops the writer thread |
| | | * Stops the writer thread. |
| | | */ |
| | | public void shutdown() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Suspends the writer thread |
| | | * Suspends the writer thread. |
| | | */ |
| | | public void pause() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Test if the writer is suspended |
| | | * Test if the writer is suspended. |
| | | */ |
| | | public boolean isPaused() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Resumes the writer thread until it is paused |
| | | * Resumes the writer thread until it is paused. |
| | | */ |
| | | public void follow() |
| | | { |
| | |
| | | start(); |
| | | } |
| | | |
| | | /** Loop reading and throwing update messages */ |
| | | /** Loop reading and throwing update messages. */ |
| | | @Override |
| | | public void run() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns last received message from reader When read, last value is |
| | | * cleared |
| | | * Returns last received message from reader When read, last value is cleared. |
| | | */ |
| | | public ReplicationMsg getLastMsg() |
| | | { |
| | |
| | | return toReturn; |
| | | } |
| | | |
| | | /** Stops reader thread */ |
| | | /** Stops reader thread. */ |
| | | public void shutdown() |
| | | { |
| | | shutdown = true; |