switch (configuration.getNodeLockingScheme())
{
case MVCC:
return componentType.cast(new CommandsFactoryImpl());
case OPTIMISTIC:
return componentType.cast(new OptimisticCommandsFactoryImpl());
case PESSIMISTIC:
return componentType.cast(new PessimisticCommandsFactoryImpl());
}
throw new ConfigurationException("Unknown locking scheme " + configuration.getNodeLockingScheme());
}