org.drools.core.util
Class ConcurrentRightTupleList
java.lang.Object
org.drools.core.util.ConcurrentRightTupleList
- All Implemented Interfaces:
- Entry, RightTupleMemory
public class ConcurrentRightTupleList
- extends Object
- implements RightTupleMemory, Entry
previous
public AtomicReference<Entry> previous
next
public AtomicReference<Entry> next
first
public AtomicReference<RightTuple> first
last
public AtomicReference<RightTuple> last
ConcurrentRightTupleList
public ConcurrentRightTupleList()
ConcurrentRightTupleList
public ConcurrentRightTupleList(AbstractHashTable.Index index,
int hashCode)
getFirst
public RightTuple getFirst(LeftTuple leftTuple,
InternalFactHandle factHandle)
- Description copied from interface:
RightTupleMemory
- The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right
node memories. This is because the memory on the opposite side would not have yet memory.removeAdd the fact, so it
could potentially be in the wrong bucket. So the bucket matches check always checks to ignore the first facthandle if it's
the same as the context fact.
- Specified by:
getFirst
in interface RightTupleMemory
- Returns:
getFirst
public RightTuple getFirst(RightTuple rightTuple)
getLast
public RightTuple getLast(LeftTuple leftTuple)
removeAdd
public void removeAdd(RightTuple rightTuple)
- Specified by:
removeAdd
in interface RightTupleMemory
add
public void add(RightTuple rightTuple)
- Specified by:
add
in interface RightTupleMemory
remove
public void remove(RightTuple rightTuple)
- We assume that this rightTuple is contained in this hash table
- Specified by:
remove
in interface RightTupleMemory
get
public RightTuple get(InternalFactHandle handle)
contains
public boolean contains(InternalFactHandle handle)
get
public RightTuple get(RightTuple rightTuple)
contains
public boolean contains(RightTuple rightTuple)
- Specified by:
contains
in interface RightTupleMemory
size
public int size()
- Specified by:
size
in interface RightTupleMemory
iterator
public Iterator iterator()
- Specified by:
iterator
in interface RightTupleMemory
fastIterator
public FastIterator fastIterator()
- Specified by:
fastIterator
in interface RightTupleMemory
fullFastIterator
public FastIterator fullFastIterator()
- Specified by:
fullFastIterator
in interface RightTupleMemory
matches
public boolean matches(Object object,
int objectHashCode)
matches
public boolean matches(LeftTuple tuple,
int tupleHashCode)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object object)
- Overrides:
equals
in class Object
getNext
public Entry getNext()
- Specified by:
getNext
in interface Entry
setNext
public void setNext(Entry next)
- Specified by:
setNext
in interface Entry
isIndexed
public boolean isIndexed()
- Specified by:
isIndexed
in interface RightTupleMemory
toString
public String toString()
- Overrides:
toString
in class Object
toArray
public Entry[] toArray()
- Specified by:
toArray
in interface RightTupleMemory
Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.