Ejemplo n.º 1
0
 public DriverStrategy getDriverStrategy() {
   final int ls = this.config.getInteger(DRIVER_STRATEGY, -1);
   if (ls == -1) {
     return DriverStrategy.NONE;
   } else if (ls < 0 || ls >= DriverStrategy.values().length) {
     throw new CorruptConfigurationException("Illegal driver strategy in configuration: " + ls);
   } else {
     return DriverStrategy.values()[ls];
   }
 }
Ejemplo n.º 2
0
 public void setDriverStrategy(DriverStrategy strategy) {
   this.config.setInteger(DRIVER_STRATEGY, strategy.ordinal());
 }