Package com.sleepycat.collections

Examples of com.sleepycat.collections.TransactionWorker


    }

    void clearAll()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                map.clear();
                assertTrue(map.isEmpty());
            }
        });
View Full Code Here


     * the end of the range. [#15858]
     */
    void removeIter()
        throws Exception {

        writeIterRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                ListIterator iter;

                /* Save contents. */
                HashMap<Object,Object> savedMap =
View Full Code Here

    }

    void removeOdd()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                boolean toggle = false;
                for (int i = beginKey; i <= endKey; i += 2) {
                    toggle = !toggle;
                    Long key = makeKey(i);
View Full Code Here

    }

    void removeOddEntity()
        throws Exception {

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

    }

    void removeOddEntry()
        throws Exception {

        writeRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                for (int i = beginKey; i <= endKey; i += 2) {
                    Long key = makeKey(i);
                    Object val = mapEntry(i);
                    assertTrue(map.entrySet().contains(val));
View Full Code Here

    }

    void removeOddIter()
        throws Exception {

        writeIterRunner.run(new TransactionWorker() {
            public void doWork() throws Exception {
                Iterator iter = iterator(map.keySet());
                try {
                    for (int i = beginKey; i <= endKey; i += 1) {
                        assertTrue(iter.hasNext());
View Full Code Here

    }

    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

TOP

Related Classes of com.sleepycat.collections.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.