@ GuardedBy ( "evictionLock" ) void reorderProbation ( Node < K , V > node ) { if ( ! accessOrderProbationDeque ( ) . contains ( node ) ) { // Ignore stale accesses for an entry that is no longer present return ; } else if ( node . getPolicyWeight ( ) > mainProtectedMaximum ( ) ) { return ; } // If the protected space exceeds its maximum, the LRU items are demoted to the probation space. // This is deferred to the adaption phase at the end of the maintenance cycle. setMainProtectedWeightedSize ( mainProtectedWeightedSize ( ) + node . getPolicyWeight ( ) ) ; accessOrderProbationDeque ( ) . remove ( node ) ; accessOrderProtectedDeque ( ) . add ( node ) ; node . makeMainProtected ( ) ; }
Promote the node from probation to protected on an access .