@Test public void testGetClients() { for (int c = 0; c < 10; c++) { reg.addClient(new Client(reg.nextId(), reg)); } Assert.assertNotNull(reg.getClient("2")); System.gc(); try { Thread.sleep(2000); System.gc(); } catch (InterruptedException e) { } Assert.assertTrue(reg.getClients().size() >= 10); }
@SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); }
ClientRegistry implements IClientRegistry, ClientRegistryMBean { @SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); } }
ClientRegistry implements IClientRegistry, ClientRegistryMBean { @SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); } ClientRegistry();  ClientRegistry(String name); }
ClientRegistry implements IClientRegistry, ClientRegistryMBean { @SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); } ClientRegistry();  ClientRegistry(String name); Client getClient(String id); ClientList<Client> getClientList(); boolean hasClient(String id); IClient lookupClient(String id); IClient newClient(Object[] params); String nextId(); String previousId(); }
ClientRegistry implements IClientRegistry, ClientRegistryMBean { @SuppressWarnings("unchecked") protected Collection<IClient> getClients() { if (!hasClients()) { return Collections.EMPTY_SET; } return Collections.unmodifiableCollection(clients.values()); } ClientRegistry();  ClientRegistry(String name); Client getClient(String id); ClientList<Client> getClientList(); boolean hasClient(String id); IClient lookupClient(String id); IClient newClient(Object[] params); String nextId(); String previousId();  }