@Test public void testRecordAndRetrieve() throws Exception { Assert.assertEquals(statements.size(), serviceStatementManager.get().length); for(ServiceStatement statement : statements) { ServiceStatement s = serviceStatementManager.get(statement.getServiceElement()); Assert.assertEquals(statement, s); Assert.assertEquals(1, s.getServiceRecords(ServiceRecord.ACTIVE_SERVICE_RECORD).length); Assert.assertEquals(0, s.getServiceRecords(ServiceRecord.INACTIVE_SERVICE_RECORD).length); } }
public ServiceStatement[] get() { ServiceStatement[] statements; synchronized (statementMap) { statements = statementMap.values().toArray(new ServiceStatement[statementMap.values().size()]); } return statements; }
TransientServiceStatementManager implements ServiceStatementManager { public ServiceStatement[] get() { ServiceStatement[] statements; synchronized (statementMap) { statements = statementMap.values().toArray(new ServiceStatement[statementMap.values().size()]); } return statements; } }
TransientServiceStatementManager implements ServiceStatementManager { public ServiceStatement[] get() { ServiceStatement[] statements; synchronized (statementMap) { statements = statementMap.values().toArray(new ServiceStatement[statementMap.values().size()]); } return statements; } TransientServiceStatementManager(Configuration config); }
TransientServiceStatementManager implements ServiceStatementManager { public ServiceStatement[] get() { ServiceStatement[] statements; synchronized (statementMap) { statements = statementMap.values().toArray(new ServiceStatement[statementMap.values().size()]); } return statements; } TransientServiceStatementManager(Configuration config); void terminate(); ServiceStatement[] get(); ServiceStatement get(ServiceElement sElem); void record(ServiceStatement statement); }
TransientServiceStatementManager implements ServiceStatementManager { public ServiceStatement[] get() { ServiceStatement[] statements; synchronized (statementMap) { statements = statementMap.values().toArray(new ServiceStatement[statementMap.values().size()]); } return statements; } TransientServiceStatementManager(Configuration config); void terminate(); ServiceStatement[] get(); ServiceStatement get(ServiceElement sElem); void record(ServiceStatement statement);  }