private void validateConfiguration ( CounterConfiguration configuration ) { storage . validatePersistence ( configuration ) ; switch ( configuration . type ( ) ) { case BOUNDED_STRONG : validateStrongCounterBounds ( configuration . lowerBound ( ) , configuration . initialValue ( ) , configuration . upperBound ( ) ) ; break ; case WEAK : if ( configuration . concurrencyLevel ( ) < 1 ) { throw log . invalidConcurrencyLevel ( configuration . concurrencyLevel ( ) ) ; } break ; } }
Validates the counter s configuration .