protected void initializeMaxLevels() { if (baseIdleWaitTime > 0 && maxIdleWaitTime > 0 && idleIncreaseFactor > 0 && maxIdleWaitTime >= baseIdleWaitTime) { // the maximum level that produces an idle time <= maxIdleTime: // see class docs for an explanation maxIdleLevel = (int) log(idleIncreaseFactor, maxIdleWaitTime / baseIdleWaitTime) + 1; // + 1 to get the minimum level that produces an idle time > maxIdleTime maxIdleLevel += 1; } else { maxIdleLevel = 0; } if (baseBackoffWaitTime > 0 && maxBackoffWaitTime > 0 && backoffIncreaseFactor > 0 && maxBackoffWaitTime >= baseBackoffWaitTime) { // the maximum level that produces a backoff time < maxBackoffTime: // see class docs for an explanation maxBackoffLevel = (int) log(backoffIncreaseFactor, maxBackoffWaitTime / baseBackoffWaitTime) + 1; // + 1 to get the minimum level that produces a backoff time > maxBackoffTime maxBackoffLevel += 1; } else { maxBackoffLevel = 0; } }
protected void initializeMaxLevels() { if (baseIdleWaitTime > 0 && maxIdleWaitTime > 0 && idleIncreaseFactor > 0 && maxIdleWaitTime >= baseIdleWaitTime) { // the maximum level that produces an idle time <= maxIdleTime: // see class docs for an explanation maxIdleLevel = (int) log(idleIncreaseFactor, maxIdleWaitTime / baseIdleWaitTime) + 1; // + 1 to get the minimum level that produces an idle time > maxIdleTime maxIdleLevel += 1; } else { maxIdleLevel = 0; } if (baseBackoffWaitTime > 0 && maxBackoffWaitTime > 0 && backoffIncreaseFactor > 0 && maxBackoffWaitTime >= baseBackoffWaitTime) { // the maximum level that produces a backoff time < maxBackoffTime: // see class docs for an explanation maxBackoffLevel = (int) log(backoffIncreaseFactor, maxBackoffWaitTime / baseBackoffWaitTime) + 1; // + 1 to get the minimum level that produces a backoff time > maxBackoffTime maxBackoffLevel += 1; } else { maxBackoffLevel = 0; } }
protected void initializeMaxLevels() { if (baseIdleWaitTime > 0 && maxIdleWaitTime > 0 && idleIncreaseFactor > 0 && maxIdleWaitTime >= baseIdleWaitTime) { // the maximum level that produces an idle time <= maxIdleTime: // see class docs for an explanation maxIdleLevel = (int) log(idleIncreaseFactor, maxIdleWaitTime / baseIdleWaitTime) + 1; // + 1 to get the minimum level that produces an idle time > maxIdleTime maxIdleLevel += 1; } else { maxIdleLevel = 0; } if (baseBackoffWaitTime > 0 && maxBackoffWaitTime > 0 && backoffIncreaseFactor > 0 && maxBackoffWaitTime >= baseBackoffWaitTime) { // the maximum level that produces a backoff time < maxBackoffTime: // see class docs for an explanation maxBackoffLevel = (int) log(backoffIncreaseFactor, maxBackoffWaitTime / baseBackoffWaitTime) + 1; // + 1 to get the minimum level that produces a backoff time > maxBackoffTime maxBackoffLevel += 1; } else { maxBackoffLevel = 0; } }