Examples of TransactionWorker


Examples of com.sleepycat.collections.TransactionWorker

    }

    void addAllList()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                for (int i = beginKey; i <= endKey; i += 1) {
                    int idx = i - beginKey;
                    Object val = makeVal(i);
                    assertTrue(!list.contains(val));
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void removeAllList()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                assertTrue(!list.isEmpty());
                list.clear();
                assertTrue(list.isEmpty());
                for (int i = beginKey; i <= endKey; i += 1) {
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void testIterAddList()
        throws Exception {

        writeIterRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                ListIterator i = list.listIterator();
                try {
                    assertTrue(!i.hasNext());
                    i.add(makeVal(3));
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void testIterAddDuplicates()
        throws Exception {

        writeIterRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                assertNull(imap.put(makeKey(1), makeVal(1)));
                ListIterator i =
                    (ListIterator) imap.duplicates(makeKey(1)).iterator();
                try {
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void readAll()
        throws Exception {

        readRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                // map

                assertNotNull(map.toString());
                for (int i = beginKey; i <= endKey; i += 1) {
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void readEven()
        throws Exception {

        readRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                int readBegin = ((beginKey & 1) != 0) ?
                                    (beginKey + 1) : beginKey;
                int readEnd = ((endKey & 1) != 0) (endKey - 1) : endKey;
                int readIncr = 2;
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void readEvenList()
        throws Exception {

        readRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                int readBegin = ((beginKey & 1) != 0) ?
                                    (beginKey + 1) : beginKey;
                int readEnd = ((endKey & 1) != 0) (endKey - 1) : endKey;
                int readIncr = 2;
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void bulkOperations()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                HashMap hmap = new HashMap();
                for (int i = Math.max(1, beginKey);
                         i <= Math.min(MAX_KEY, endKey);
                         i += 1) {
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    }

    void bulkListOperations()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                ArrayList alist = new ArrayList();
                for (int i = beginKey; i <= endKey; i += 1) {
                    alist.add(makeVal(i));
                }
View Full Code Here

Examples of com.sleepycat.collections.TransactionWorker

    void readWriteRange(final int type, final int rangeBegin,
                        final int rangeEnd)
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                setRange(type, rangeBegin, rangeEnd);
                createOutOfRange(rangeBegin, rangeEnd);
                if (rangeType != TAIL) {
                    writeOutOfRange(new Long(rangeEnd + 1));
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.