Package com.sleepycat.collections

Examples of com.sleepycat.collections.StoredSortedMap


    }

    public void testReadUncommittedCollection()
        throws Exception {

        StoredSortedMap dirtyMap = (StoredSortedMap)
            StoredCollections.configuredSortedMap
                (map, CursorConfig.READ_UNCOMMITTED);

        // original map is not read-uncommitted
        assertTrue(!isReadUncommitted(map));
View Full Code Here


        //
        // Now create a collection style map view of the data store
        // so that it is easy to work with the data in the database.
        //
        this.map = new StoredSortedMap(db, keyBinding, dataBinding, true);
    }
View Full Code Here

        // StoredSortedMap is not used since the stores and indices are
        // ordered by serialized key objects, which do not provide a very
        // useful ordering.
        //
        partMap =
            new StoredSortedMap(db.getPartDatabase(),
                                partKeyBinding, partDataBinding, true);
        supplierMap =
            new StoredSortedMap(db.getSupplierDatabase(),
                                supplierKeyBinding, supplierDataBinding, true);
        shipmentMap =
            new StoredSortedMap(db.getShipmentDatabase(),
                                shipmentKeyBinding, shipmentDataBinding, true);
        shipmentByPartMap =
            new StoredSortedMap(db.getShipmentByPartDatabase(),
                                partKeyBinding, shipmentDataBinding, true);
        shipmentBySupplierMap =
            new StoredSortedMap(db.getShipmentBySupplierDatabase(),
                                supplierKeyBinding, shipmentDataBinding, true);
        supplierByCityMap =
            new StoredSortedMap(db.getSupplierByCityDatabase(),
                                cityKeyBinding, supplierDataBinding, true);
    }
View Full Code Here

        // StoredSortedMap is not used since the stores and indices are
        // ordered by serialized key objects, which do not provide a very
        // useful ordering.
        //
        partMap =
            new StoredSortedMap(db.getPartDatabase(),
                                partKeyBinding, partDataBinding, true);
        supplierMap =
            new StoredSortedMap(db.getSupplierDatabase(),
                                supplierKeyBinding, supplierDataBinding, true);
        shipmentMap =
            new StoredSortedMap(db.getShipmentDatabase(),
                                shipmentKeyBinding, shipmentDataBinding, true);
        shipmentByPartMap =
            new StoredSortedMap(db.getShipmentByPartDatabase(),
                                partKeyBinding, shipmentDataBinding, true);
        shipmentBySupplierMap =
            new StoredSortedMap(db.getShipmentBySupplierDatabase(),
                                supplierKeyBinding, shipmentDataBinding, true);
        supplierByCityMap =
            new StoredSortedMap(db.getSupplierByCityDatabase(),
                                cityKeyBinding, supplierDataBinding, true);
    }
View Full Code Here

        // Create map views for all stores and indices.
        // StoredSortedMap is used since the stores and indices are ordered
        // (they use the DB_BTREE access method).
        //
        partMap =
            new StoredSortedMap(db.getPartDatabase(),
        partKeyBinding, partDataBinding, true);
        supplierMap =
            new StoredSortedMap(db.getSupplierDatabase(),
        supplierKeyBinding, supplierDataBinding, true);
        shipmentMap =
            new StoredSortedMap(db.getShipmentDatabase(),
        shipmentKeyBinding, shipmentDataBinding, true);
        shipmentByPartMap =
            new StoredSortedMap(db.getShipmentByPartDatabase(),
                                partKeyBinding, shipmentDataBinding, true);
        shipmentBySupplierMap =
            new StoredSortedMap(db.getShipmentBySupplierDatabase(),
                                supplierKeyBinding, shipmentDataBinding, true);
        supplierByCityMap =
            new StoredSortedMap(db.getSupplierByCityDatabase(),
                                cityKeyBinding, supplierDataBinding, true);
    }
View Full Code Here

        SerialBinding dataBinding = new SerialBinding(catalog, String.class);

        this.db = env.openDatabase(null, "helloworld", null, dbConfig);

        // create a map view of the database
        this.map = new StoredSortedMap(db, keyBinding, dataBinding, true);
    }
View Full Code Here

        return sortedMap();
    }

    public synchronized SortedMap<SK,E> sortedMap() {
        if (map == null) {
            map = new StoredSortedMap(db, keyBinding, entityBinding, true);
        }
        return map;
    }
View Full Code Here

        throws Exception {

        // create primary map
        if (testStore.areKeyRangesAllowed()) {
            if (isEntityBinding) {
                smap = new StoredSortedMap(store, keyBinding,
                                           entityBinding,
                                           testStore.getKeyAssigner());
                valueSet = new StoredSortedValueSet(store, entityBinding,
                                                    true);
            } else {
                smap = new StoredSortedMap(store, keyBinding,
                                           valueBinding,
                                           testStore.getKeyAssigner());
                // sorted value set is not possible since key cannot be derived
                // for performing subSet, etc.
            }
View Full Code Here

        readAll();

        // create indexed map (keySet/valueSet)
        if (testStore.areKeyRangesAllowed()) {
            if (isEntityBinding) {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 entityBinding, true);
                valueSet = new StoredSortedValueSet(index, entityBinding,
                                                    true);
            } else {
                map = smap = new StoredSortedMap(index, keyBinding,
                                                 valueBinding, true);
                // sorted value set is not possible since key cannot be derived
                // for performing subSet, etc.
            }
            keySet = new StoredSortedKeySet(index, keyBinding, true);
View Full Code Here

        return sortedMap();
    }

    public synchronized SortedMap<SK,PK> sortedMap() {
        if (map == null) {
            map = new StoredSortedMap(db, keyBinding, pkeyBinding, true);
        }
        return map;
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.collections.StoredSortedMap

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.