public class QueryKey
extends java.lang.Object
implements java.io.Externalizable
Constructor and Description |
---|
QueryKey()
Public constructor for externalization only.
|
Modifier and Type | Method and Description |
---|---|
boolean |
changeInvalidatesQuery(java.util.Collection<java.lang.Class<?>> changed)
Returns
true if modifications to any of the
classes in changed results in a possible
invalidation of this query; otherwise returns
false . |
boolean |
equals(java.lang.Object ob)
Determine equality based on identifying information.
|
java.util.Set<java.lang.String> |
getAcessPathClassNames()
Returns the set of the accessPathClassnames that exists in the query
|
java.lang.String |
getCandidateTypeName()
Returns the candidate class name for this query.
|
int |
getTimeout()
Return the amount of time this key is good for.
|
int |
hashCode()
Define a hashing algorithm corresponding to the
equals(java.lang.Object)
method defined above. |
static QueryKey |
newInstance(Query q)
Return a key for the given query, or null if it is not cacheable.
|
(package private) static QueryKey |
newInstance(QueryContext q,
boolean packed,
java.util.Map<java.lang.Object,java.lang.Object> args,
java.lang.Class<?> candidate,
boolean subs,
long startIdx,
long endIdx,
java.lang.Object parsed)
Return a key for the given query, or null if it is not cacheable.
|
(package private) static QueryKey |
newInstance(QueryContext q,
boolean packed,
java.lang.Object[] args,
java.lang.Class<?> candidate,
boolean subs,
long startIdx,
long endIdx,
java.lang.Object parsed)
Return a key for the given query, or null if it is not cacheable.
|
static QueryKey |
newInstance(Query q,
java.util.Map<java.lang.Object,java.lang.Object> args)
Return a key for the given query, or null if it is not cacheable.
|
static QueryKey |
newInstance(Query q,
java.lang.Object[] args)
Return a key for the given query, or null if it is not cacheable.
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
public static QueryKey newInstance(Query q)
public static QueryKey newInstance(Query q, java.lang.Object[] args)
public static QueryKey newInstance(Query q, java.util.Map<java.lang.Object,java.lang.Object> args)
static QueryKey newInstance(QueryContext q, boolean packed, java.lang.Object[] args, java.lang.Class<?> candidate, boolean subs, long startIdx, long endIdx, java.lang.Object parsed)
static QueryKey newInstance(QueryContext q, boolean packed, java.util.Map<java.lang.Object,java.lang.Object> args, java.lang.Class<?> candidate, boolean subs, long startIdx, long endIdx, java.lang.Object parsed)
public java.lang.String getCandidateTypeName()
public int getTimeout()
public boolean changeInvalidatesQuery(java.util.Collection<java.lang.Class<?>> changed)
true
if modifications to any of the
classes in changed
results in a possible
invalidation of this query; otherwise returns
false
. Invalidation is possible if one or more of
the classes in this query key's access path has been changed.public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
public int hashCode()
equals(java.lang.Object)
method defined above.hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public java.util.Set<java.lang.String> getAcessPathClassNames()
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.