@Test(expected = WorkerFamilyNotFoundException.class) public void unregister_non_existing_family_worker_ko() throws Exception { final String familyId = "NewFamilyId" + GUIDFactory.newGUID().getId(); final String workerId = "NewWorkerId1"; workerManager.unregisterWorker(familyId, workerId); }
@Override public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException { final WorkerFamilyManager workerManager = workersFamily.get(workerFamily); if (workerManager == null) { throw new WorkerFamilyNotFoundException("Worker : " + worker + " not found in the family :" + workerFamily); } workerManager.unregisterWorker(worker); marshallToDB(); }
WorkerManager implements IWorkerManager { @Override public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException { final WorkerFamilyManager workerManager = workersFamily.get(workerFamily); if (workerManager == null) { throw new WorkerFamilyNotFoundException("Worker : " + worker + " not found in the family :" + workerFamily); } workerManager.unregisterWorker(worker); marshallToDB(); } }
WorkerManager implements IWorkerManager { @Override public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException { final WorkerFamilyManager workerManager = workersFamily.get(workerFamily); if (workerManager == null) { throw new WorkerFamilyNotFoundException("Worker : " + worker + " not found in the family :" + workerFamily); } workerManager.unregisterWorker(worker); marshallToDB(); } WorkerManager();  WorkerManager(WorkerClientFactory workerClientFactory); }
WorkerManager implements IWorkerManager { @Override public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException { final WorkerFamilyManager workerManager = workersFamily.get(workerFamily); if (workerManager == null) { throw new WorkerFamilyNotFoundException("Worker : " + worker + " not found in the family :" + workerFamily); } workerManager.unregisterWorker(worker); marshallToDB(); } WorkerManager();  WorkerManager(WorkerClientFactory workerClientFactory); @Override synchronized void marshallToDB(); @Override void registerWorker(String familyId, String workerId, WorkerBean workerInformation); @Override void registerWorker(WorkerBean workerBean); @Override void unregisterWorker(String workerFamily, String worker); @Override boolean checkStatusWorker(String serverHost, int serverPort); @Override WorkerFamilyManager findWorkerBy(String workerFamily); @Override File getWorkerDbFile(); }
WorkerManager implements IWorkerManager { @Override public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException { final WorkerFamilyManager workerManager = workersFamily.get(workerFamily); if (workerManager == null) { throw new WorkerFamilyNotFoundException("Worker : " + worker + " not found in the family :" + workerFamily); } workerManager.unregisterWorker(worker); marshallToDB(); } WorkerManager();  WorkerManager(WorkerClientFactory workerClientFactory); @Override synchronized void marshallToDB(); @Override void registerWorker(String familyId, String workerId, WorkerBean workerInformation); @Override void registerWorker(WorkerBean workerBean); @Override void unregisterWorker(String workerFamily, String worker); @Override boolean checkStatusWorker(String serverHost, int serverPort); @Override WorkerFamilyManager findWorkerBy(String workerFamily); @Override File getWorkerDbFile(); static final int QUEUE_SIZE; }