Package com.sleepycat.bdb

Examples of com.sleepycat.bdb.TransactionWorker


    }

    void removeOddList()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                for (int i = beginKey; i <= endKey; i += 2) {
                    // remove by index
                    // (with entity binding, embbeded keys in values are
                    // being changed so we can't use values for comparison)
View Full Code Here


    }

    void removeOddListValue()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                for (int i = beginKey; i <= endKey; i += 2) {
                    // for non-entity case remove by value
                    // (with entity binding, embbeded keys in values are
                    // being changed so we can't use values for comparison)
View Full Code Here

    }

    void addOdd()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                // add using Map.put()
                for (int i = beginKey; i <= endKey; i += 2) {
                    Long key = makeKey(i);
                    Object val = makeVal(i);
View Full Code Here

    }

    void addOddEntity()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                // add using Map.values().add()
                for (int i = beginKey; i <= endKey; i += 2) {
                    Long key = makeKey(i);
                    Object val = makeVal(i);
View Full Code Here

    }

    void addOddDup()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                // add using Map.duplicates().add()
                for (int i = beginKey; i <= endKey; i += 2) {
                    Long key = makeKey(i);
                    Object val = makeVal(i);
View Full Code Here

    }

    void addOddList()
        throws Exception {

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

    }

    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

    }

    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

    }

    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

    }

    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

TOP

Related Classes of com.sleepycat.bdb.TransactionWorker

Copyright © 2018 www.massapicom. 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.