org.schemarepo
Class RepositoryCache
java.lang.Object
org.schemarepo.RepositoryCache
- All Implemented Interfaces:
- SubjectCache
- Direct Known Subclasses:
- InMemoryCache
public class RepositoryCache
- extends Object
- implements SubjectCache
A RepositoryCache composes a SubjectCache with a
SchemaEntryCache.Factory, using
Subject.cacheWith(Subject, SchemaEntryCache) to wrap Subject
instances prior to insertion into the SubjectCache.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RepositoryCache
@Inject
public RepositoryCache(SubjectCache subjects,
SchemaEntryCache.Factory entryCacheFactory)
add
public Subject add(Subject entry)
- 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.
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
Copyright © 2015. All rights reserved.