function FunctionCall(fn, args, callback) {
    events.EventEmitter.call(this);

    precond.checkIsFunction(fn, 'Expected fn to be a function.');
    precond.checkIsArray(args, 'Expected args to be an array.');
    precond.checkIsFunction(callback, 'Expected callback to be a function.');

    this.function_ = fn;
    this.arguments_ = args;
    this.callback_ = callback;
    this.lastResult_ = [];
    this.numRetries_ = 0;

    this.backoff_ = null;
    this.strategy_ = null;
    this.failAfter_ = -1;
    this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_;

    this.state_ = FunctionCall.State_.PENDING;
}
function FunctionCall(fn, args, callback) {
    events.EventEmitter.call(this);

    precond.checkIsFunction(fn, 'Expected fn to be a function.');
    precond.checkIsArray(args, 'Expected args to be an array.');
    precond.checkIsFunction(callback, 'Expected callback to be a function.');

    this.function_ = fn;
    this.arguments_ = args;
    this.callback_ = callback;
    this.lastResult_ = [];
    this.numRetries_ = 0;

    this.backoff_ = null;
    this.strategy_ = null;
    this.failAfter_ = -1;
    this.retryPredicate_ = FunctionCall.DEFAULT_RETRY_PREDICATE_;

    this.state_ = FunctionCall.State_.PENDING;
}
function FunctionCall ( fn , args , callback ) { events . EventEmitter . call ( this ) ; precond . checkIsFunction ( fn , 'Expected fn to be a function.' ) ; precond . checkIsArray ( args , 'Expected args to be an array.' ) ; precond . checkIsFunction ( callback , 'Expected callback to be a function.' ) ; this . function_ = fn ; this . arguments_ = args ; this . callback_ = callback ; this . lastResult_ = [ ] ; this . numRetries_ = 0 ; this . backoff_ = null ; this . strategy_ = null ; this . failAfter_ = - 1 ; this . retryPredicate_ = FunctionCall . DEFAULT_RETRY_PREDICATE_ ; this . state_ = FunctionCall . State_ . PENDING ; }
Wraps a function to be called in a backoff loop.
Wraps a function to be called in a backoff loop .