Validate Bulkhead configure and make sure the value and waitingTaskQueue must be greater than or equal to 1.
349457
@Override
    public void validate() {
        //validate the parameters
        String target = getTargetName();
        if (value() < 1) {
            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "bulkhead.parameter.invalid.value.CWMFT5016E", "value ", value(), target));
        }
        //validate the parameters
        if (waitingTaskQueue() < 1) {
            throw new FaultToleranceDefinitionException(Tr.formatMessage(tc, "bulkhead.parameter.invalid.value.CWMFT5016E", "waitingTaskQueue", waitingTaskQueue(),
                                                                         target));
        }

    }
506710
def validate(config):
    '''
    
    '''
    _config = {}
    list(map(_config.update, config))

    if not isinstance(config, list):
        return False, ('Configuration for avahi_announce '
                       'beacon must be a list.')

    elif not all(x in _config for x in ('servicetype',
                                        'port',
                                        'txt')):
        return False, ('Configuration for avahi_announce beacon '
                       'must contain servicetype, port and txt items.')
    return True, 'Valid beacon configuration.'
973412
def validate(self,
                 asset,
                 amount,
                 portfolio,
                 algo_datetime,
                 algo_current_data):
        
        algo_date = algo_datetime.date()

        # Reset order count if it's a new day.
        if self.current_date and self.current_date != algo_date:
            self.orders_placed = 0
        self.current_date = algo_date

        if self.orders_placed >= self.max_count:
            self.handle_violation(asset, amount, algo_datetime)
        self.orders_placed += 1
1011129
private void applyPoolConfiguration(PoolConfiguration pc,
                                       org.ironjacamar.common.api.metadata.common.Validation v)
   {
      if (v != null)
      {
         if (v.isValidateOnMatch() != null)
            pc.setValidateOnMatch(v.isValidateOnMatch().booleanValue());

         if (v.isBackgroundValidation() != null)
            pc.setBackgroundValidation(v.isBackgroundValidation().booleanValue());

         if (v.getBackgroundValidationMillis() != null)
            pc.setBackgroundValidationMillis(v.getBackgroundValidationMillis().longValue());

         if (v.isUseFastFail() != null)
            pc.setUseFastFail(v.isUseFastFail().booleanValue());
      }
   }
192115
def limit(value = nil, &block)
      chain { criteria.update_request_options size: block || Integer(value) }
    end
727108
def validate(config):
    '''
    
    '''

    try:
        _validate(config)
        return True, 'Valid beacon configuration'
    except ValidationError as error:
        return False, str(error)
349680
def _validate(self):
        
        for key in self:
            if key not in DEFAULTS:
                raise exceptions.ConfigurationException(
                    'Unknown configuration key "{}"! Valid configuration keys are'
                    " {}".format(key, list(DEFAULTS.keys()))
                )

        validate_queues(self["queues"])
        validate_bindings(self["bindings"])
        validate_client_properties(self["client_properties"])
640372
def _validate_max_staleness(max_staleness):
    """"""
    if max_staleness == -1:
        return -1

    if not isinstance(max_staleness, integer_types):
        raise TypeError(_invalid_max_staleness_msg(max_staleness))

    if max_staleness <= 0:
        raise ValueError(_invalid_max_staleness_msg(max_staleness))

    return max_staleness
306253
def check_conf_percentage_validity(conf_percentage):
    
    msg = "conf_percentage MUST be a number between 0.0 and 100."
    condition_1 = isinstance(conf_percentage, Number)
    if not condition_1:
        raise ValueError(msg)
    else:
        condition_2 = 0 < conf_percentage < 100
        if not condition_2:
            raise ValueError(msg)
    return None
530307
def validate(config):
    """"""
    with open(config) as fh:
        data = utils.yaml_load(fh.read())
        jsonschema.validate(data, CONFIG_SCHEMA)
586311
def _validated(self, value):
        """"""
        if value is None:
            return None
        try:
            return self._format_num(value)
        except (TypeError, ValueError):
            self.fail('invalid', input=value)
        except OverflowError:
            self.fail('too_large', input=value)
1041640
function(fn) {
				funcGuard(fn);
				if (completeQueue !== noop) {
					throw new Error('queue `then` already set');
				}
				if (!err) {
					completeQueue = fn;
					if (!remaining) {
						complete = true;
						completeQueue(tasks);
					}
				}
				return q;
			}
309306
def validate(self, value, redis):
        '''
        
        '''
        # cleanup
        if type(value) == str:
            value = value.strip()

        value = self.value_or_default(value)

        # validation
        self.validate_required(value)

        if self.regex and not re.match(self.regex, value, flags=re.ASCII):
            raise InvalidFieldError(self.name)

        if self.forbidden and value in self.forbidden:
            raise ReservedFieldError(self.name)

        if self.allowed and value not in self.allowed:
            raise InvalidFieldError(self.name)

        if self.index:
            key = self.key()

            old = debyte_string(redis.hget(key, value))
            old_value = getattr(self.obj, self.name)

            if old is not None and old != self.obj.id:
                raise NotUniqueFieldError(self.name)
            elif old_value != value:
                self.obj._old[self.name] = old_value

        return value
36158
private boolean incSlotLimit(JobInfo info, TaskType type, LimitType limit) {
    switch (limit) {
      case MIN:
        if (type == TaskType.MAP) {
          if (info.minMaps < runnableTasks(info, type)) {
            info.minMaps += 1;
            return true;
          }
        } else {
          if (info.minReduces < runnableTasks(info, type)) {
            info.minReduces += 1;
            return true;
          }
        }
        return false;
      case MAX:
        if (type == TaskType.MAP) {
          if (info.maxMaps < runnableTasks(info, type)) {
            info.maxMaps += 1;
            return true;
          }
        } else {
          if (info.maxReduces < runnableTasks(info, type)) {
            info.maxReduces += 1;
            return true;
          }
        }
        return false;
    }
    // Never come here
    return false;
  }
914189
private void validate() {
        LibraryUtils.checkArgumentNotNull(config, "Configuration is null.");
        LibraryUtils.checkArgumentNotNull(eventsProcessor, "Events Processor is null.");
        LibraryUtils.checkArgumentNotNull(sourceFilter, "Source Filter is null.");
        LibraryUtils.checkArgumentNotNull(eventFilter, "Event Filter is null.");
        LibraryUtils.checkArgumentNotNull(progressReporter, "Progress Reporter is null.");
        LibraryUtils.checkArgumentNotNull(exceptionHandler, "Exception Handler is null.");
        LibraryUtils.checkArgumentNotNull(s3Manager, "S3 Manager is null.");
        LibraryUtils.checkArgumentNotNull(sqsManager, "SQS Manager is null.");
    }
812654
@Override
  public void ensureValid(String setting, Object value) {
    if (null == value || !(value instanceof Integer)) {
      throw new ConfigException(setting, "Must be an integer.");
    }
    final Integer port = (Integer) value;

    if (!(port >= this.start && port <= this.end)) {
      throw new ConfigException(
          setting,
          String.format("(%s) must be between %s and %s.", port, this.start, this.end)
      );
    }
  }
962566
def _validateIterCommonParams(MaxObjectCount, OperationTimeout):
    
    if MaxObjectCount is None or MaxObjectCount <= 0:
        raise ValueError(
            _format("MaxObjectCount must be > 0 but is {0}", MaxObjectCount))

    if OperationTimeout is not None and OperationTimeout < 0:
        raise ValueError(
            _format("OperationTimeout must be >= 0 but is {0}",
                    OperationTimeout))