put操作
1.prewrite
void preWriteCleanup(long now)
void runLockedCleanup(long now)
void drainReferenceQueues()
void expireEntries(long now)
以上是准备工作,和get方法中的准备类似。
2.postwrite
void postWriteCleanup()
void runUnlockedCleanup();
// 该方法会把removalNotificationQueue中的元素清楚掉,并调用onRemoval方法
void processPendingNotifications(){
RemovalNotification<K, V> notification;
while ((notification = removalNotificationQueue.poll()) != null) {
try {
removalListener.onRemoval(notification);
} catch (Throwable e) {
logger.log(Level.WARNING, "Exception thrown by removal listene