Package net.jini.space

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


    {
        if (txn == null) {
            throw new TestException("Transaction is null for test " + testName);
        }
        JavaSpace05 space05 = (JavaSpace05) space;
        Collection result = space05.take(templates, txn, timeout, maxEntries);
        maxEntries -= result.size();
        if (result.size() > 0) {
            while (maxEntries > 0) {
                Collection anyMore = space05.take(templates, txn, 1000,
                                                  maxEntries);
View Full Code Here


        JavaSpace05 space05 = (JavaSpace05) space;
        Collection result = space05.take(templates, txn, timeout, maxEntries);
        maxEntries -= result.size();
        if (result.size() > 0) {
            while (maxEntries > 0) {
                Collection anyMore = space05.take(templates, txn, 1000,
                                                  maxEntries);
                if (anyMore.size() == 0) break;
                result.addAll(anyMore);
                maxEntries -= anyMore.size();
            }
View Full Code Here

        /*
         * check that entry1 can be taken from the space 3 times,
         * and entries 2 and 3 only once.
         */
        SimpleEntry result = (SimpleEntry) space05.take(sampleEntry1, txn,
                                                        checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, checkTime);
        if (result == null) {
            throw new TestException("performed 2-nd and 3-rd write "
View Full Code Here

         * check that entry1 can be taken from the space 3 times,
         * and entries 2 and 3 only once.
         */
        SimpleEntry result = (SimpleEntry) space05.take(sampleEntry1, txn,
                                                        checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, checkTime);
        if (result == null) {
            throw new TestException("performed 2-nd and 3-rd write "
                    + "operation for the same " + sampleEntry1
                    + " with " + leaseTime1 + " lease time and "
View Full Code Here

         * and entries 2 and 3 only once.
         */
        SimpleEntry result = (SimpleEntry) space05.take(sampleEntry1, txn,
                                                        checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, checkTime);
        result = (SimpleEntry) space05.take(sampleEntry1, txn, 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, txn, 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, txn, checkTime);
        if (result == null) {
            throw new TestException(sampleEntry3 + " with " + leaseTime2
                                    + " lease time"
                                    + " is not available in the space.");
        }
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.