@Override protected void initialize(ConfigurationContext context) { super.initialize(context); ServerConfigurationContext scc = (ServerConfigurationContext) context; collector = scc.getObjectManager().getGarbageCollector(); collector.setState(gcState); garbageCollectionManager = scc.getGarbageCollectionManager(); gcSink = scc.getStage(ServerConfigurationContext.GARBAGE_COLLECT_STAGE).getSink(); }
@Override protected void setUp() throws Exception { transactionManager = mock(ServerTransactionManager.class); gtxm = mock(ServerGlobalTransactionManager.class); callBack = mock(TxnsInSystemCompletionListener.class); sequencer = new ResentTransactionSequencer(); replicatedObjectManager = mock(ReplicatedObjectManager.class); batchReader = mock(TransactionBatchReader.class); L2HACoordinator l2HACoordinator = mock(L2HACoordinator.class); when(l2HACoordinator.getReplicatedObjectManager()).thenReturn(replicatedObjectManager); ServerConfigurationContext context = mock(ServerConfigurationContext.class); when(context.getServerGlobalTransactionManager()).thenReturn(gtxm); when(context.getTransactionManager()).thenReturn(transactionManager); when(context.getL2Coordinator()).thenReturn(l2HACoordinator); sequencer.initializeContext(context); }