Package net.tomp2p.p2p

Examples of net.tomp2p.p2p.Peer.halt()


        } finally {
            if (peer1 != null) {
                peer1.halt();
            }
            if (peer2 != null) {
                peer2.halt();
            }
        }
    }

    @Test
View Full Code Here


        } finally {
            if (peer1 != null) {
                peer1.halt();
            }
            if (peer2 != null) {
                peer2.halt();
            }
        }
    }

    @Test
View Full Code Here

        } finally {
            if (peer1 != null) {
                peer1.halt();
            }
            if (peer2 != null) {
                peer2.halt();
            }
        }
    }

    @Test
View Full Code Here

            dataMap.put(new Number160(22), new Data("testme"));
            FutureAsyncTask futureAsyncTask = peer1.getAsyncTask().submit(peer2.getPeerAddress(),
                    futureChannelCreator.getChannelCreator(), taskId, dataMap, new MyWorker3(), false, false);
            Utils.addReleaseListenerAll(futureAsyncTask, peer1.getConnectionBean().getConnectionReservation(),
                    futureChannelCreator.getChannelCreator());
            peer2.halt();
            futureAsyncTask.awaitUninterruptibly();
            Assert.assertEquals(false, futureAsyncTask.isSuccess());
        } finally {
            if (peer1 != null) {
                peer1.halt();
View Full Code Here

            ft.awaitUninterruptibly();
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(1, ft.getRawDataMap().size());
        } finally {
            System.out.println("done");
            master.halt();
        }
    }

    @Test
    public void testTaskSubmit2() throws Exception {
View Full Code Here

            ft.awaitUninterruptibly();
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(2, ft.getRawDataMap().size());
        } finally {
            System.out.println("done");
            master.halt();
        }
    }
}

class Worker2 implements Worker {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.