- Common ways to obtain CacheLongKeyLIRS$Entry
private void myMethod () {CacheLongKeyLIRS$Entry c =
CacheLongKeyLIRS cacheLongKeyLIRS;cacheLongKeyLIRS.getSegment(int1).find(key, hash)
- Smart code suggestions by Codota
}
private static <V> Entry<V> copy(Entry<V> old) { Entry<V> e = new Entry<>(); e.key = old.key; e.value = old.value; e.memory = old.memory; e.topMove = old.topMove; return e; }
e = new Entry<>(); e.key = key; e.value = value;
private static <V> Entry<V> copy(Entry<V> old) { Entry<V> e = new Entry<>(); e.key = old.key; e.value = old.value; e.memory = old.memory; e.topMove = old.topMove; return e; }
private static <V> Entry<V> copy(Entry<V> old) { Entry<V> e = new Entry<V>(); e.key = old.key; e.value = old.value; e.memory = old.memory; e.topMove = old.topMove; return e; }
private static <V> Entry<V> copy(Entry<V> old) { Entry<V> e = new Entry<V>(); e.key = old.key; e.value = old.value; e.memory = old.memory; e.topMove = old.topMove; return e; }
/** * Create a new cache segment. * * @param maxMemory the maximum memory to use * @param stackMoveDistance the number of other entries to be moved to * the top of the stack before moving an entry to the top * @param len the number of hash table buckets (must be a power of 2) * @param nonResidentQueueSize the non-resident queue size factor */ Segment(long maxMemory, int stackMoveDistance, int len, int nonResidentQueueSize) { setMaxMemory(maxMemory); this.stackMoveDistance = stackMoveDistance; this.nonResidentQueueSize = nonResidentQueueSize; // the bit mask has all bits set mask = len - 1; // initialize the stack and queue heads stack = new Entry<>(); stack.stackPrev = stack.stackNext = stack; queue = new Entry<>(); queue.queuePrev = queue.queueNext = queue; queue2 = new Entry<>(); queue2.queuePrev = queue2.queueNext = queue2; @SuppressWarnings("unchecked") Entry<V>[] e = new Entry[len]; entries = e; }
/** * Create a new cache segment. * * @param maxMemory the maximum memory to use * @param stackMoveDistance the number of other entries to be moved to * the top of the stack before moving an entry to the top * @param len the number of hash table buckets (must be a power of 2) * @param nonResidentQueueSize the non-resident queue size factor */ Segment(long maxMemory, int stackMoveDistance, int len, int nonResidentQueueSize) { setMaxMemory(maxMemory); this.stackMoveDistance = stackMoveDistance; this.nonResidentQueueSize = nonResidentQueueSize; // the bit mask has all bits set mask = len - 1; // initialize the stack and queue heads stack = new Entry<>(); stack.stackPrev = stack.stackNext = stack; queue = new Entry<>(); queue.queuePrev = queue.queueNext = queue; queue2 = new Entry<>(); queue2.queuePrev = queue2.queueNext = queue2; @SuppressWarnings("unchecked") Entry<V>[] e = new Entry[len]; entries = e; }
/** * Create a new cache segment. * * @param maxMemory the maximum memory to use * @param stackMoveDistance the number of other entries to be moved to * the top of the stack before moving an entry to the top * @param len the number of hash table buckets (must be a power of 2) * @param nonResidentQueueSize the non-resident queue size factor */ Segment(long maxMemory, int stackMoveDistance, int len, int nonResidentQueueSize) { setMaxMemory(maxMemory); this.stackMoveDistance = stackMoveDistance; this.nonResidentQueueSize = nonResidentQueueSize; // the bit mask has all bits set mask = len - 1; // initialize the stack and queue heads stack = new Entry<V>(); stack.stackPrev = stack.stackNext = stack; queue = new Entry<V>(); queue.queuePrev = queue.queueNext = queue; queue2 = new Entry<V>(); queue2.queuePrev = queue2.queueNext = queue2; @SuppressWarnings("unchecked") Entry<V>[] e = new Entry[len]; entries = e; }
e = new Entry<V>(); e.key = key; e.value = value;
e = new Entry<>(); e.key = key; e.value = value;
e = new Entry<V>(); e.key = key; e.value = value;
/** * Create a new cache segment. * * @param maxMemory the maximum memory to use * @param stackMoveDistance the number of other entries to be moved to * the top of the stack before moving an entry to the top * @param len the number of hash table buckets (must be a power of 2) * @param nonResidentQueueSize the non-resident queue size factor */ Segment(long maxMemory, int stackMoveDistance, int len, int nonResidentQueueSize) { setMaxMemory(maxMemory); this.stackMoveDistance = stackMoveDistance; this.nonResidentQueueSize = nonResidentQueueSize; // the bit mask has all bits set mask = len - 1; // initialize the stack and queue heads stack = new Entry<V>(); stack.stackPrev = stack.stackNext = stack; queue = new Entry<V>(); queue.queuePrev = queue.queueNext = queue; queue2 = new Entry<V>(); queue2.queuePrev = queue2.queueNext = queue2; @SuppressWarnings("unchecked") Entry<V>[] e = new Entry[len]; entries = e; }