@ Deprecated @ GwtIncompatible ( "To be supported" ) @ Override MapMaker expireAfterAccess ( long duration , TimeUnit unit ) { checkExpiration ( duration , unit ) ; this . expireAfterAccessNanos = unit . toNanos ( duration ) ; if ( duration == 0 && this . nullRemovalCause == null ) { // SIZE trumps EXPIRED this . nullRemovalCause = RemovalCause . EXPIRED ; } useCustomMap = true ; return this ; }
Specifies that each entry should be automatically removed from the map once a fixed duration has elapsed after the entry s last read or write access .