Package io.ebean.cache
Class QueryCacheEntry
- java.lang.Object
-
- io.ebean.cache.QueryCacheEntry
-
public class QueryCacheEntry extends Object
For query cache entries we additionally hold the dependent tables and timestamp for the query result.We use the dependent tables and timestamp to validate that tables the query joins to have not been modified since the query cache entry was cached. If any dependent tables have since been modified the query cache entry is treated as invalid.
-
-
Constructor Summary
Constructors Constructor Description QueryCacheEntry(Object value, Set<String> dependentTables, long timestamp)
Create with dependent tables and timestamp.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
getDependentTables()
Return the tables the query result is dependent on.long
getTimestamp()
Return the timestamp used to check for modifications on the dependent tables.Object
getValue()
Return the actual query result.
-
-
-
Constructor Detail
-
QueryCacheEntry
public QueryCacheEntry(Object value, Set<String> dependentTables, long timestamp)
Create with dependent tables and timestamp.- Parameters:
value
- The query result being cacheddependentTables
- The extra tables the query is dependent on (joins to)timestamp
- The timestamp that the query uses to check for modifications
-
-
Method Detail
-
getDependentTables
public Set<String> getDependentTables()
Return the tables the query result is dependent on.
-
getTimestamp
public long getTimestamp()
Return the timestamp used to check for modifications on the dependent tables.
-
-