Sets the wait strategy used to decide how long to sleep between failed attempts.
The default strategy is to retry immediately after a failed attempt

@param waitStrategy
@return
183221
public Retryer<R> withWaitStrategy(WaitStrategy waitStrategy) {
        (this.waitStrategy = (this.waitStrategy.isPresent() 
                ? this.waitStrategy : Optional.of(new CompositeWaitStrategy())))
                .get().put(checkNotNull(waitStrategy, "WaitStrategy cannot be null"));
        return this;
    }
1214420
public void setAsynchConsumerCallback(int requestNumber,
                                         int maxActiveMessages,
                                         long messageLockExpiry,
                                         int batchsize,
                                         OrderingContext orderContext,
                                         boolean stoppable,
                                         int maxSequentialFailures,
                                         long hiddenMessageDelay)
   {
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setAsynchConsumerCallback",
                                          new Object[]
                                          {
                                             requestNumber,
                                             maxActiveMessages,
                                             messageLockExpiry,
                                             batchsize,
                                             orderContext,
                                             stoppable,
                                             maxSequentialFailures,
                                             hiddenMessageDelay});

     SIErrorException e = new SIErrorException(nls.getFormattedMessage("PROTOCOL_ERROR_SICO2003", null, null));

     FFDCFilter.processException(e, CLASS_NAME + ".setAsynchConsumerCallback",CommsConstants.CATCONSUMER_SETASYNCHCALLBACK_01,this);

     SibTr.error(tc, "PROTOCOL_ERROR_SICO2003", e);

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setAsynchConsumerCallback");

     // Re-throw this exception so that the client will informed if required
     throw e;
   }
988302
public void selectStrategy() {
		LightweightTypeReference expectedType = expectation.getExpectedType();
		if (expectedType == null) {
			strategy = getClosureWithoutExpectationHelper();
		} else {
			JvmOperation operation = functionTypes.findImplementingOperation(expectedType);
			JvmType type = expectedType.getType();
			int closureParameterSize;
			if (closure.isExplicitSyntax()) {
				closureParameterSize = closure.getDeclaredFormalParameters().size();
			} else if (operation != null) {
				closureParameterSize = operation.getParameters().size();
			} else {
				closureParameterSize = 1;
			}
			if (operation == null || operation.getParameters().size() != closureParameterSize || type == null) {
				strategy = getClosureWithoutExpectationHelper();
			} else {
				strategy = createClosureWithExpectationHelper(operation);
			}
		}
		
	}
536388
@Override
	public SqlAgentFactory setDefaultSqlRetryWaitTime(final int defaultSqlRetryWaitTime) {
		getDefaultProps().put(PROPS_KEY_DEFAULT_SQL_RETRY_WAIT_TIME, String.valueOf(defaultSqlRetryWaitTime));
		return this;
	}
1184813
public boolean withEveryRetryWaitFor(int time, TimeUnit units) {
        for (int i = 1; i <= retries; i++) {
            if (openSocket()) {
                return true;
            }
            sleepFor(time, units);
        }
        return false;
    }
78943
public static PrioritizationStrategy getPrioritizationStrategy(String attributeValue) throws StrategyException {
        TaskInstanceStrategyFactory factory = getInstance();
        String className = factory.getStrategyClassName(attributeValue, StrategyType.PrioritizationStrategy);
        PrioritizationStrategy strategy = (PrioritizationStrategy) factory.getStrategyInstance(PrioritizationStrategy.class, className, null);
        return strategy;
    }
802157
func (s *HyperParameterTuningJobSummary) SetStrategy(v string) *HyperParameterTuningJobSummary {
	s.Strategy = &v
	return s
}
176580
public void setAssertionLookupStrategy(final Function<ProfileRequestContext, Assertion> strategy) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    this.assertionLookupStrategy = Constraint.isNotNull(strategy, "Assertion lookup strategy cannot be null");
  }
61134
private static FailStrategy howToDealFailure(NaviFailStrategy failStg) {
        if (NaviFailStrategy.FAILOVER.equals(failStg)) {
            return new FailOverStrategy(RpcClientConf.RPC_RETRY_TIMES);
        } else if (NaviFailStrategy.FAILFAST.equals(failStg)) {
            return new FailFastStrategy();
        }
        return new FailOverStrategy();
    }
700189
private LocatorSelectionStrategy getLocatorSelectionStrategy(String locatorSelectionStrategy) {
        if (null == locatorSelectionStrategy) {
            return locatorSelectionStrategyMap.get(DEFAULT_STRATEGY).getInstance();
        }

        if (LOG.isLoggable(Level.FINE)) {
            LOG.log(Level.FINE, "Strategy " + locatorSelectionStrategy
                    + " was set for LocatorClientRegistrar.");
        }

        if (locatorSelectionStrategyMap.containsKey(locatorSelectionStrategy)) {
            return locatorSelectionStrategyMap.get(locatorSelectionStrategy).getInstance();
        } else {
            if (LOG.isLoggable(Level.WARNING)) {
                LOG.log(Level.WARNING, "LocatorSelectionStrategy " + locatorSelectionStrategy
                        + " not registered at LocatorClientEnabler.");
            }
            return locatorSelectionStrategyMap.get(DEFAULT_STRATEGY).getInstance();
        }
    }
1276390
func DefaultWaitStrategy(delta int64) (abort error) {
	if delta > 10 {
		return errors.Errorf("Waiting for %d blocks... aborting", delta)
	} else if delta > 0 {
		// estimate of wait time....
		// wait half a second for the next block (in progress)
		// plus one second for every full block
		delay := time.Duration(delta-1)*time.Second + 500*time.Millisecond
		time.Sleep(delay)
	}
	return nil
}
46213
func Wait(durations ...time.Duration) Strategy {
	return func(attempt uint) bool {
		if 0 < attempt && 0 < len(durations) {
			durationIndex := int(attempt - 1)

			if len(durations) <= durationIndex {
				durationIndex = len(durations) - 1
			}

			time.Sleep(durations[durationIndex])
		}

		return true
	}
}
583874
func (s *Service) SetSchedulingStrategy(v string) *Service {
	s.SchedulingStrategy = &v
	return s
}
1244355
func (h *Heartbeater) SetStrategy(strategy Strategy) *Heartbeater {
	h.Strategy = strategy

	return h
}
83131
public void setChainStartRetryAttempts(Object value) throws NumberFormatException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Setting chain start retry attempts [" + value + "]");
        }
        try {
            int num = MetatypeUtils.parseInteger(PROPERTY_CONFIG_ALIAS, PROPERTY_CHAIN_START_RETRY_ATTEMPTS, value, chainStartRetryAttempts);
            if (-1 <= num) {
                this.chainStartRetryAttempts = num;
            } else {
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Value too low");
                }
            }
        } catch (NumberFormatException nfe) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Vaue is not a number");
            }
        }
    }
262267
public void addStrategy(MappingStrategy strategy)
    {
        if (strategies == null)
        {
            strategies = new ArrayList<>();
        }
        strategies.add(strategy);
    }
18407
public boolean waitForActivity(ComponentName name, int retryTime) {
        final int retryPeriod = 250;
        int retryNum = retryTime / retryPeriod;
        for (int i = 0; i < retryNum; i++) {
            if (this.getCurrentActivity().getComponentName().equals(name)) {
                break;
            }
            if (i == retryNum - 1) {
                return false;
            }
            this.sleep(retryPeriod);
        }
        return true;
    }