Package net.snowflake.client.core
Class QueryContextCache
- java.lang.Object
-
- net.snowflake.client.core.QueryContextCache
-
public class QueryContextCache extends Object
Most Recently Used and Priority based cache. A separate cache for each connection in the driver.
-
-
Constructor Summary
Constructors Constructor Description QueryContextCache(int capacity)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clear the cache.void
deserializeQueryContextDTO(QueryContextDTO queryContextDTO)
Deserialize the QueryContext cache from a QueryContextDTO object.void
deserializeQueryContextJson(String data)
QueryContextDTO
serializeQueryContextDTO()
Serialize the QueryContext cache to a QueryContextDTO object, which can be serialized to JSON automatically later.
-
-
-
Method Detail
-
clearCache
public void clearCache()
Clear the cache.
-
deserializeQueryContextJson
public void deserializeQueryContextJson(String data)
- Parameters:
data
- : the QueryContext Object serialized as a JSON format string
-
deserializeQueryContextDTO
public void deserializeQueryContextDTO(QueryContextDTO queryContextDTO)
Deserialize the QueryContext cache from a QueryContextDTO object. This function currently is only used in QueryContextCacheTest.java where we check that after serialization and deserialization, the cache is the same as before.
-
serializeQueryContextDTO
public QueryContextDTO serializeQueryContextDTO()
Serialize the QueryContext cache to a QueryContextDTO object, which can be serialized to JSON automatically later.
-
-