/** * Sets a new lookahead size. See {@link #getLookaheadSize()} for details on what this is. Setting a new size * that's larger than the current size will return immediately and the new size will only take effect next time * a fresh filter is requested (e.g. due to a new peer being connected). So you should set this before starting * to sync the chain, if you want to modify it. If you haven't modified the lookahead threshold manually then * it will be automatically set to be a third of the new size. */ public void setLookaheadSize(int lookaheadSize) { lock.lock(); try { boolean readjustThreshold = this.lookaheadThreshold == calcDefaultLookaheadThreshold(); this.lookaheadSize = lookaheadSize; if (readjustThreshold) this.lookaheadThreshold = calcDefaultLookaheadThreshold(); } finally { lock.unlock(); } }
/** * Sets a new lookahead size. See {@link #getLookaheadSize()} for details on what this is. Setting a new size * that's larger than the current size will return immediately and the new size will only take effect next time * a fresh filter is requested (e.g. due to a new peer being connected). So you should set this before starting * to sync the chain, if you want to modify it. If you haven't modified the lookahead threshold manually then * it will be automatically set to be a third of the new size. */ public void setLookaheadSize(int lookaheadSize) { lock.lock(); try { boolean readjustThreshold = this.lookaheadThreshold == calcDefaultLookaheadThreshold(); this.lookaheadSize = lookaheadSize; if (readjustThreshold) this.lookaheadThreshold = calcDefaultLookaheadThreshold(); } finally { lock.unlock(); } }
/** * Sets a new lookahead size. See {@link #getLookaheadSize()} for details on what this is. Setting a new size * that's larger than the current size will return immediately and the new size will only take effect next time * a fresh filter is requested (e.g. due to a new peer being connected). So you should set this before starting * to sync the chain, if you want to modify it. If you haven't modified the lookahead threshold manually then * it will be automatically set to be a third of the new size. */ public void setLookaheadSize(int lookaheadSize) { lock.lock(); try { boolean readjustThreshold = this.lookaheadThreshold == calcDefaultLookaheadThreshold(); this.lookaheadSize = lookaheadSize; if (readjustThreshold) this.lookaheadThreshold = calcDefaultLookaheadThreshold(); } finally { lock.unlock(); } }
/** * Sets a new lookahead size. See {@link #getLookaheadSize()} for details on what this is. Setting a new size * that's larger than the current size will return immediately and the new size will only take effect next time * a fresh filter is requested (e.g. due to a new peer being connected). So you should set this before starting * to sync the chain, if you want to modify it. If you haven't modified the lookahead threshold manually then * it will be automatically set to be a third of the new size. */ public void setLookaheadSize(int lookaheadSize) { lock.lock(); try { boolean readjustThreshold = this.lookaheadThreshold == calcDefaultLookaheadThreshold(); this.lookaheadSize = lookaheadSize; if (readjustThreshold) this.lookaheadThreshold = calcDefaultLookaheadThreshold(); } finally { lock.unlock(); } }