RemovalNotification实例是在entry被删除之后RemovalListener上接收到的对象。RemovalNotification实现Map.Entry 接口,我们可以访问到cache上entry实际的key和value。如果entry由于垃圾收集被删除,那么这些value可能会是null。 我们同样可以获取到被删除的原因,通过调用RemovalNotification实例上的getCause()方法,这个方法返回一个RemovalCause enum。 RemovalCause enum可能的值如下: