protected DataInterface createDataInterface(DataType dataType, DatabaseCachingType cachingType, DataInterfaceFactory factory) {
String dataInterfaceName = "readWriteBigrams_" + dataType + "_" + cachingType + "_" + factory.getClass().getSimpleName();
switch (dataType) {
case LONG_COUNT:
return factory.createDataInterface(cachingType, dataInterfaceName, Long.class, new LongCombinator());
case SERIALIZED_OBJECT:
return factory.createDataInterface(cachingType, dataInterfaceName, BigramCount.class, new BigramCountCombinator());
default:
throw new RuntimeException("Unknown data type " + dataType);
}