h2/src/main/org/h2/mvstore/db/TransactionStore.java
/**
     * Open the map with the given name.
     *
     * @param <K> the key type
     * @param name the map name
     * @param keyType the key type
     * @param valueType the value type
     * @return the map
     */
Open the map with the given name.
Open the map with the given name .
synchronized <K> MVMap<K, VersionedValue> openMap(String name,
            DataType keyType, DataType valueType) {
        if (keyType == null) {
            keyType = new ObjectDataType();
        }
        if (valueType == null) {
            valueType = new ObjectDataType();
        }
        VersionedValueType vt = new VersionedValueType(valueType);
        MVMap<K, VersionedValue> map;
        if (CONCURRENT) {
            MVMapConcurrent.Builder<K, VersionedValue> builder =
                    new MVMapConcurrent.Builder<K, VersionedValue>().
                    keyType(keyType).valueType(vt);
            map = store.openMap(name, builder);
        } else {
            MVMap.Builder<K, VersionedValue> builder =
                    new MVMap.Builder<K, VersionedValue>().
                    keyType(keyType).valueType(vt);
            map = store.openMap(name, builder);
        }
        @SuppressWarnings("unchecked")
        MVMap<Object, VersionedValue> m = (MVMap<Object, VersionedValue>) map;
        maps.put(map.getId(), m);
        return map;
    }
synchronized < K > MVMap < K , VersionedValue > openMap ( String name , DataType keyType , DataType valueType ) { if ( keyType == null ) { keyType = new ObjectDataType ( ) ; } if ( valueType == null ) { valueType = new ObjectDataType ( ) ; } VersionedValueType vt = new VersionedValueType ( valueType ) ; MVMap < K , VersionedValue > map ; if ( CONCURRENT ) { MVMapConcurrent . Builder < K , VersionedValue > builder = new MVMapConcurrent . Builder < K , VersionedValue > ( ) . keyType ( keyType ) . valueType ( vt ) ; map = store . openMap ( name , builder ) ; } else { MVMap . Builder < K , VersionedValue > builder = new MVMap . Builder < K , VersionedValue > ( ) . keyType ( keyType ) . valueType ( vt ) ; map = store . openMap ( name , builder ) ; } @ SuppressWarnings ( "unchecked" ) MVMap < Object , VersionedValue > m = ( MVMap < Object , VersionedValue > ) map ; maps . put ( map . getId ( ) , m ) ; return map ; }
Open the map with the given name.
Open the map with the given name .