|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SchemaEntryCache
A SchemaEntryCache is a bi-directional cache from a schema string to
a schema id string. In a given Subject the mapping between a schema
and its id is immutable and can be cached. Other aspects of Subject
are not safe to cache.
In a Subject schemas are Strings and can not be null or empty.
See RepositoryUtil.validateSchemaOrSubject(String)
add(SchemaEntry), lookupById(String), and
lookupBySchema(String) must be thread-safe with respect to
each-other.
| Nested Class Summary | |
|---|---|
static interface |
SchemaEntryCache.Factory
Creates instances of SchemaEntryCache |
| Method Summary | |
|---|---|
SchemaEntry |
add(SchemaEntry entry)
Add the schema entry to this cache. |
SchemaEntry |
lookupById(String id)
Look up a schema entry by its id. |
SchemaEntry |
lookupBySchema(String schema)
Look up a schema entry by its full string form. |
| Method Detail |
|---|
SchemaEntry lookupBySchema(String schema)
NullPointerException - If the provided schema is nullSchemaEntry lookupById(String id)
NullPointerException - If the provided id is nullSchemaEntry add(SchemaEntry entry)
entry - schema entry to add. If the provided entry is null, returns null;
SchemaEntry that is in the cache after the call
completes. If the entry already exists the pre-existing value is
returned, otherwise the value returned is the entry provided. If
the provided entry is null, returns null. Thread-safe.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||