public class TripleCache extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SIZE
The size of the cache array.
|
Constructor and Description |
---|
TripleCache() |
public static int SIZE
public Triple put(Triple t)
t
by storing it in the slot with the its reduced
hash. Any triple already in that slot vanishes. Answer that triple.public Triple get(Node s, Node p, Node o)
s
, predicate
p
, and object o
, or null
if
no such triple exists.
The implementation looks in the slot with the same reduced hashCode as
the SPO combination would have. If the triple there has the same SPO,
it is returned; otherwise null
is returned.
Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP