-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unneccesary top-level cache fields
Previously the cache implemented AbstractMap for the its convenient putAll, equals, hashCode, and toString implementations. This came at the cost of its private, unused keySet and values fields. Those Object methods iterated over the entrySet, which returns a copy of the entry to avoid instabiliy due to concurrent mutations. This changes to internal iterators which avoids this unnecessary garbage creation. Equality is a complex subject and the implementation's internal docs now better clarify the semantics. Due to the cache potentially holding entries that are pending removal (expiration, reference collection), we expect that usages call Cache.cleanUp() first. Removed an adapter for the async cache loader as not needed, dropping two instance fields. Simplified some serialization code by removing redundancies.
- Loading branch information
Showing
15 changed files
with
536 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.