@Test public void testSessionsAreEstablishedToAllResolvedEndpoints() { recycler.run(); verify(sessionFactory, times(6)).openSession(any(InetSocketAddress.class)); verify(sessionFactory).openSession(new InetSocketAddress(HOST1_IP1, 9003)); verify(sessionFactory).openSession(new InetSocketAddress(HOST2_IP1, 9003)); verify(sessionFactory).openSession(new InetSocketAddress(HOST3_IP1, 9003)); verify(sessionFactory).openSession(new InetSocketAddress(HOST1_IP2, 9003)); verify(sessionFactory).openSession(new InetSocketAddress(HOST2_IP2, 9003)); verify(sessionFactory).openSession(new InetSocketAddress(HOST3_IP2, 9003)); }
@Override public void run() { recycleSessions(); }
SessionRecycler implements Runnable { @Override public void run() { recycleSessions(); } }
SessionRecycler implements Runnable { @Override public void run() { recycleSessions(); } SessionRecycler(IoSessionFactory sessionFactory, NetworkAddressResolver resolver, String hosts, long sessionRecycleInterval); }
SessionRecycler implements Runnable { @Override public void run() { recycleSessions(); } SessionRecycler(IoSessionFactory sessionFactory, NetworkAddressResolver resolver, String hosts, long sessionRecycleInterval); void initialise(); @Override void run(); @ManagedOperation void recycleSessions(); @ManagedAttribute String getHosts(); @ManagedAttribute String getLastResolvedHosts(); @ManagedAttribute String getLastOpenedSessions(); @ManagedAttribute String getLastClosedSessions(); @ManagedAttribute Date getLastErrorTimestamp(); @ManagedAttribute String getLastErrorMessage(); @ManagedAttribute long getSessionRecycleInterval(); @ManagedAttribute Date getLastRecycleTimestamp(); @ManagedAttribute Date getLastCheckTimestamp(); }
SessionRecycler implements Runnable { @Override public void run() { recycleSessions(); } SessionRecycler(IoSessionFactory sessionFactory, NetworkAddressResolver resolver, String hosts, long sessionRecycleInterval); void initialise(); @Override void run(); @ManagedOperation void recycleSessions(); @ManagedAttribute String getHosts(); @ManagedAttribute String getLastResolvedHosts(); @ManagedAttribute String getLastOpenedSessions(); @ManagedAttribute String getLastClosedSessions(); @ManagedAttribute Date getLastErrorTimestamp(); @ManagedAttribute String getLastErrorMessage(); @ManagedAttribute long getSessionRecycleInterval(); @ManagedAttribute Date getLastRecycleTimestamp(); @ManagedAttribute Date getLastCheckTimestamp();  }