org.schemarepo
Class InMemorySubjectCache
java.lang.Object
org.schemarepo.InMemorySubjectCache
- All Implemented Interfaces:
- SubjectCache
public class InMemorySubjectCache
- extends Object
- implements SubjectCache
An unbounded in memory SubjectCache that never evicts any values.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemorySubjectCache
public InMemorySubjectCache()
lookup
public Subject lookup(String name)
- Description copied from interface:
SubjectCache
- Look up a
Subject by its name. Thread-safe.
- Specified by:
lookup in interface SubjectCache
add
public Subject add(Subject subject)
- Description copied from interface:
SubjectCache
- Add or update the
Subject entry in this cache.
- Specified by:
add in interface SubjectCache
- Returns:
- the
Subject that is in the cache after the call completes.
If the entry already exists this is the pre-existing value,
otherwise it is the value provided. If the value provided is null,
returns null. Thread-safe.
values
public Iterable<Subject> values()
- Returns:
- All fo the
Subject values in this
InMemorySubjectCache
Copyright © 2015. All rights reserved.