com.couchbase.client.core.deps.org.jctools.util.SpscLookAheadUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-io Show documentation
Show all versions of core-io Show documentation
The official Couchbase JVM Core IO Library
package com.couchbase.client.core.deps.org.jctools.util;
@InternalAPI
public class SpscLookAheadUtil
{
public static final int MAX_LOOK_AHEAD_STEP = Integer.getInteger("jctools.spsc.max.lookahead.step", 4096);
public static int computeLookAheadStep(int actualCapacity)
{
return Math.min(actualCapacity / 4, MAX_LOOK_AHEAD_STEP);
}
}