Examples of takeIfExists()


Examples of net.jini.space.JavaSpace.takeIfExists()

                // try to read the entry we wrote
                String msg = "Expected space to re-activate after shutdown.\n"
                        + "Got : ";
                Entry en = null;

    en = space.takeIfExists(new UninterestingEntry(), null, 0);

                // Check for read the entry we wrote
                if (en == null) {
                    throw new TestException(
                            "Could not get entry we wrote before shutdown");
View Full Code Here

Examples of net.jini.space.JavaSpace.takeIfExists()

                    throw new TestException(
                            "Could not get entry we wrote before shutdown");
                }
            } else {
                try {
                    space.takeIfExists(new UninterestingEntry(), null, 0);
                    throw new TestException("Space did not go away");
                } catch (RemoteException e) {
                    // This is what we are looking for
                }
            }
View Full Code Here

Examples of org.springmodules.javaspaces.gigaspaces.app.ISimpleDao.takeIfExists()

    ISimpleDao dao = (ISimpleDao)applicationContext.getBean("simpleDAO");
    SimpleBean bean = new SimpleBean("zvika", 32);
    dao.writeSimple(bean);

    SimpleBean template = new SimpleBean("zvika", 32);
    SimpleBean taken = dao.takeIfExists(bean);

    assertEquals("written object is not equal to taken one!", bean, taken);
  }
}
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.