Package com.sleepycat.collections

Examples of com.sleepycat.collections.StoredKeySet


                map = new StoredMap(store, keyBinding, valueBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(store, keyBinding, true);
        }
        imap = map;

        // create primary list
        if (testStore.hasRecNumAccess()) {
View Full Code Here


            } else {
                map = new StoredMap(index, keyBinding, valueBinding, true);
                valueSet = new StoredValueSet(index, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(index, keyBinding, true);
        }

        // create indexed list
        if (testStore.hasRecNumAccess()) {
            if (isEntityBinding) {
View Full Code Here

    void testCdbLocking() {

        Iterator readIterator;
        Iterator writeIterator;
        StoredKeySet set = (StoredKeySet) map.keySet();

        // can open two CDB read cursors
        readIterator = set.iterator(false);
        try {
            Iterator readIterator2 = set.iterator(false);
            StoredIterator.close(readIterator2);
        } finally {
            StoredIterator.close(readIterator);
        }

        // can open two CDB write cursors
        writeIterator = set.iterator(true);
        try {
            Iterator writeIterator2 = set.iterator(true);
            StoredIterator.close(writeIterator2);
        } finally {
            StoredIterator.close(writeIterator);
        }

        // cannot open CDB write cursor when read cursor is open,
        readIterator = set.iterator(false);
        try {
            writeIterator = set.iterator(true);
            fail();
            StoredIterator.close(writeIterator);
        } catch (IllegalStateException e) {
        } finally {
            StoredIterator.close(readIterator);
        }

        if (index == null) {
            // cannot put() with read cursor open
            readIterator = set.iterator(false);
            try {
                map.put(makeKey(1), makeVal(1));
                fail();
            } catch (IllegalStateException e) {
            } finally {
                StoredIterator.close(readIterator);
            }

            // cannot append() with write cursor open with RECNO/QUEUE only
            writeIterator = set.iterator(true);
            try {
                if (testStore.isQueueOrRecno()) {
                    try {
                        map.append(makeVal(1));
                        fail();
View Full Code Here

                map = new StoredMap(store, keyBinding, valueBinding,
                                    testStore.getKeyAssigner());
                valueSet = new StoredValueSet(store, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(store, keyBinding, true);
        }
        imap = map;

        // create primary list
        if (testStore.hasRecNumAccess()) {
View Full Code Here

            } else {
                map = new StoredMap(index, keyBinding, valueBinding, true);
                valueSet = new StoredValueSet(index, valueBinding, true);
            }
            smap = null;
            keySet = new StoredKeySet(index, keyBinding, true);
        }

        // create indexed list
        if (testStore.hasRecNumAccess()) {
            if (isEntityBinding) {
View Full Code Here

    void testCdbLocking() {

        Iterator readIterator;
        Iterator writeIterator;
        StoredKeySet set = (StoredKeySet) map.keySet();

        // can open two CDB read cursors
        readIterator = set.storedIterator(false);
        try {
            Iterator readIterator2 = set.storedIterator(false);
            StoredIterator.close(readIterator2);
        } finally {
            StoredIterator.close(readIterator);
        }

        // can open two CDB write cursors
        writeIterator = set.storedIterator(true);
        try {
            Iterator writeIterator2 = set.storedIterator(true);
            StoredIterator.close(writeIterator2);
        } finally {
            StoredIterator.close(writeIterator);
        }

        // cannot open CDB write cursor when read cursor is open,
        readIterator = set.storedIterator(false);
        try {
            writeIterator = set.storedIterator(true);
            fail();
            StoredIterator.close(writeIterator);
        } catch (IllegalStateException e) {
        } finally {
            StoredIterator.close(readIterator);
        }

        if (index == null) {
            // cannot put() with read cursor open
            readIterator = set.storedIterator(false);
            try {
                map.put(makeKey(1), makeVal(1));
                fail();
            } catch (IllegalStateException e) {
            } finally {
                StoredIterator.close(readIterator);
            }

            // cannot append() with write cursor open with RECNO/QUEUE only
            writeIterator = set.storedIterator(true);
            try {
                if (testStore.isQueueOrRecno()) {
                    try {
                        map.append(makeVal(1));
                        fail();
View Full Code Here

TOP

Related Classes of com.sleepycat.collections.StoredKeySet

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.