Package org.apache.calcite.schema.lookup
Class LoadingCacheLookup<T>
java.lang.Object
org.apache.calcite.schema.lookup.LoadingCacheLookup<T>
- Type Parameters:
- T- Element Type
- All Implemented Interfaces:
- Lookup<T>
This class is using a 
LoadingCache to speed up lookups,
 delegated to another Lookup instance.
 This class is thread safe. All entries are evicted after one minute.
 Negative matches are never cached. If a new entry
 becomes available in the associated Lookup, it's immediately
 visible outside. If an entry is deleted in the associated Lookup,
 it takes one minute until it disappears if it was cached in the last minute.
 Otherwise, it disappears immediately.
- 
Constructor SummaryConstructorsConstructorDescriptionLoadingCacheLookup(Lookup<T> delegate) Creates aLookupobject with a `LoadingCache`inside.LoadingCacheLookup(Lookup<T> delegate, Duration expiration) Creates aLookupobject with a `LoadingCache`inside.
- 
Method SummaryModifier and TypeMethodDescription@Nullable TReturns a named entity with a given name, or null if not found.getIgnoreCase(String name) Returns a named entity with a given name ignoring the case, or null if not found.getNames(LikePattern pattern) Returns the names of the entities in matching pattern.
- 
Constructor Details- 
LoadingCacheLookupCreates aLookupobject with a `LoadingCache`inside.- Parameters:
- delegate- The- Lookupobject, which should be cached
- expiration- The duration after which the entries are evicted from the loading cache.
 
- 
LoadingCacheLookupCreates aLookupobject with a `LoadingCache`inside.The expiration is set to 1 minute. - Parameters:
- delegate- The- Lookupobject, which should be cached
 
 
- 
- 
Method Details- 
getDescription copied from interface:LookupReturns a named entity with a given name, or null if not found.
- 
getIgnoreCaseDescription copied from interface:LookupReturns a named entity with a given name ignoring the case, or null if not found.- Specified by:
- getIgnoreCasein interface- Lookup<T>
- Parameters:
- name- Name
- Returns:
- Entity with the specified name (case insensitive), or null when the entity is not found.
 
- 
getNamesDescription copied from interface:LookupReturns the names of the entities in matching pattern. The search is always case sensitive. This is caused by the fact thatDatabaseMetaData.getTables(...)doesn't support case insensitive lookups.
 
-