| java.lang.Object org.continuent.sequoia.controller.cache.metadata.MetadataCache
MetadataCache | public class MetadataCache (Code) | | This class implements a ResultSet metadata cache.
ResultSet Fields are kept here to prevent recomputing them and allocating
them each time a query is executed.
author: Emmanuel Cecchet version: 1.0 |
Constructor Summary | |
public | MetadataCache(int maxNbOfMetadata, int maxNbOfField) Constructor for MetadataCache. |
MetadataCache | public MetadataCache(int maxNbOfMetadata, int maxNbOfField)(Code) | | Constructor for MetadataCache.
Parameters: maxNbOfMetadata - maximum nb of entries in metadata cache Parameters: maxNbOfField - maximum nb of entries in field cache |
addField | public void addField(String fullyQualifiedFieldName, Field field)(Code) | | Add a Field entry to the cache and associate it to the given name.
Parameters: fullyQualifiedFieldName - table.column.label name that uniquelyidentifies the field Parameters: field - field to cache |
addMetadata | public void addMetadata(AbstractRequest request, Field[] metadata)(Code) | | Add a metadata entry to the cache and associate it to the given request.
Parameters: request - request to which the metadata belong Parameters: metadata - metadata to cache |
flushCache | public void flushCache()(Code) | | Flush the cache
|
getField | public Field getField(String fullyQualifiedFieldName)(Code) | | Get the field corresponding to a column name.
Returns null if the cache contains no field for the given name.
Parameters: fullyQualifiedFieldName - the field name (table.column.label) to lookfor the corresponding Field or null if not in cache |
getMetadata | public Field[] getMetadata(AbstractRequest request)(Code) | | Get metadata associated to a request.
Returns null if the cache contains no metadata for the given request.
Parameters: request - the request we look for the metadata or null if not in cache |
getXml | public String getXml()(Code) | | Get xml information about this ParsingCache
String in xml formatted text |
|
|