Package net.jini.space

Examples of net.jini.space.JavaSpace05.take()


         * and entries 2 and 3 only once.
         */
        SimpleEntry result = (SimpleEntry) space05.take(sampleEntry1, null,
                                                        checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, null, checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, null, checkTime);
        if (result == null) {
            throw new TestException("performed 2-nd and 3-rd write "
                    + "operation for the same " + sampleEntry1
                    + " with " + leaseTime1 + " lease time and "
                    + leaseTime2 + " lease time and all or some "
View Full Code Here


                    + "operation for the same " + sampleEntry1
                    + " with " + leaseTime1 + " lease time and "
                    + leaseTime2 + " lease time and all or some "
                    + "of the entries can not be taken");
        }
        result = (SimpleEntry) space05.take(sampleEntry2, null, checkTime);
        if (result == null) {
            throw new TestException(sampleEntry2 + " with " + leaseTime1
                                    + " lease time"
                                    + " is not available in the space.");
        }
View Full Code Here

        if (result == null) {
            throw new TestException(sampleEntry2 + " with " + leaseTime1
                                    + " lease time"
                                    + " is not available in the space.");
        }
        result = (SimpleEntry) space05.take(sampleEntry3, null, checkTime);
        if (result == null) {
            throw new TestException(sampleEntry3 + " with " + leaseTime2
                                    + " lease time"
                                    + " is not available in the space.");
        }
View Full Code Here

        txn = getTransaction();
        templates.add((SimpleEntry) sampleEntry1.clone());
        templates.add("Not an antry");
        JavaSpace05 space05 = (JavaSpace05) space;
        try {
            space05.take(templates, txn, instantTime, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when templates contain not an instance "
                                    + "of Entry element");
        } catch (IllegalArgumentException e) {}
View Full Code Here

                                    + "of Entry element");
        } catch (IllegalArgumentException e) {}

        templates.clear();
        try {
            space05.take(templates, txn, instantTime, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when templates is empty");
        } catch (IllegalArgumentException e) {}

        templates.add((SimpleEntry) sampleEntry1.clone());
View Full Code Here

                                    + "when templates is empty");
        } catch (IllegalArgumentException e) {}

        templates.add((SimpleEntry) sampleEntry1.clone());
        try {
            space05.take(templates, txn, -1, MAX_ENTRIES);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when timout is negative (-1)");
        } catch (IllegalArgumentException e) {}

        try {
View Full Code Here

            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when timout is negative (-1)");
        } catch (IllegalArgumentException e) {}

        try {
            space05.take(templates, txn, instantTime, 0);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when maxEntries is non-positive (0)");
        } catch (IllegalArgumentException e) {}

        try {
View Full Code Here

            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when maxEntries is non-positive (0)");
        } catch (IllegalArgumentException e) {}

        try {
            space05.take(templates, txn, instantTime, -1);
            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when maxEntries is non-positive (-1)");
        } catch (IllegalArgumentException e) {}

        try {
View Full Code Here

            throw new TestException("IllegalArgumentException is not thrown "
                                    + "when maxEntries is non-positive (-1)");
        } catch (IllegalArgumentException e) {}

        try {
            space05.take(null, txn, instantTime, MAX_ENTRIES);
            throw new TestException("NullPointerException is not thrown "
                                    + "when templates is null");
        } catch (NullPointerException e) {}

        txn.commit();
View Full Code Here

        txn.commit();

        // transaction txn is not null and is not usable by the space
        try {
            space05.take(templates, txn, instantTime, MAX_ENTRIES);
            throw new TestException("TransactionException is not thrown "
                                    + "when taking from the space with "
                                    + "transaction which is not null "
                                    + "and is not usable by the space");
        } catch (TransactionException e) {}
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.