Search in sources :

Example 6 with MethodFactory

use of org.apache.derby.iapi.store.access.conglomerate.MethodFactory in project derby by apache.

the class RAMAccessManager method boot_load_conglom_map.

private void boot_load_conglom_map() throws StandardException {
    // System.out.println("before new code.");
    conglom_map = new ConglomerateFactory[2];
    // Find the appropriate factory for the desired implementation.
    MethodFactory mfactory = findMethodFactoryByImpl("heap");
    if (mfactory == null || !(mfactory instanceof ConglomerateFactory)) {
        throw StandardException.newException(SQLState.AM_NO_SUCH_CONGLOMERATE_TYPE, "heap");
    }
    conglom_map[ConglomerateFactory.HEAP_FACTORY_ID] = (ConglomerateFactory) mfactory;
    // Find the appropriate factory for the desired implementation.
    mfactory = findMethodFactoryByImpl("BTREE");
    if (mfactory == null || !(mfactory instanceof ConglomerateFactory)) {
        throw StandardException.newException(SQLState.AM_NO_SUCH_CONGLOMERATE_TYPE, "BTREE");
    }
    conglom_map[ConglomerateFactory.BTREE_FACTORY_ID] = (ConglomerateFactory) mfactory;
// System.out.println("conglom_map[0] = " + conglom_map[0]);
// System.out.println("conglom_map[1] = " + conglom_map[1]);
}
Also used : MethodFactory(org.apache.derby.iapi.store.access.conglomerate.MethodFactory) ConglomerateFactory(org.apache.derby.iapi.store.access.conglomerate.ConglomerateFactory)

Aggregations

MethodFactory (org.apache.derby.iapi.store.access.conglomerate.MethodFactory)6 ConglomerateFactory (org.apache.derby.iapi.store.access.conglomerate.ConglomerateFactory)2 SortFactory (org.apache.derby.iapi.store.access.conglomerate.SortFactory)2 HashMap (java.util.HashMap)1 Properties (java.util.Properties)1 Conglomerate (org.apache.derby.iapi.store.access.conglomerate.Conglomerate)1 Sort (org.apache.derby.iapi.store.access.conglomerate.Sort)1 StandardException (org.apache.derby.shared.common.error.StandardException)1