Package org.drools.core.common
Class ClassAwareObjectStore
- java.lang.Object
-
- org.drools.core.common.ClassAwareObjectStore
-
- All Implemented Interfaces:
Externalizable
,Serializable
,ObjectStore
public class ClassAwareObjectStore extends Object implements Externalizable, ObjectStore
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ClassAwareObjectStore.SingleClassStore
-
Constructor Summary
Constructors Constructor Description ClassAwareObjectStore()
ClassAwareObjectStore(boolean isEqualityBehaviour, Lock lock)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHandle(InternalFactHandle handle, Object object)
void
clear()
boolean
clearClassStore(Class<?> clazz)
static Class<?>
getActualClass(Object object)
InternalFactHandle
getHandleForObject(Object object)
InternalFactHandle
getHandleForObjectIdentity(Object object)
Object
getObjectForHandle(InternalFactHandle handle)
ClassAwareObjectStore.SingleClassStore
getOrCreateClassStore(Class<?> clazz)
FactHandleClassStore
getStoreForClass(Class<?> clazz)
boolean
isEmpty()
Iterator<InternalFactHandle>
iterateFactHandles()
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsIterator<InternalFactHandle>
iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsIterator<InternalFactHandle>
iterateNegFactHandles(org.kie.api.runtime.ObjectFilter filter)
Iterator<Object>
iterateNegObjects(org.kie.api.runtime.ObjectFilter filter)
Iterator<Object>
iterateObjects()
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsIterator<Object>
iterateObjects(Class<?> clazz)
Iterator<Object>
iterateObjects(org.kie.api.runtime.ObjectFilter filter)
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsvoid
readExternal(ObjectInput in)
InternalFactHandle
reconnect(InternalFactHandle handle)
void
removeHandle(InternalFactHandle handle)
int
size()
void
updateHandle(InternalFactHandle handle, Object object)
void
writeExternal(ObjectOutput out)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.core.common.ObjectStore
iterateFactHandles
-
-
-
-
Constructor Detail
-
ClassAwareObjectStore
public ClassAwareObjectStore()
-
ClassAwareObjectStore
public ClassAwareObjectStore(boolean isEqualityBehaviour, Lock lock)
-
-
Method Detail
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
size
public int size()
- Specified by:
size
in interfaceObjectStore
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceObjectStore
-
clear
public void clear()
- Specified by:
clear
in interfaceObjectStore
-
getObjectForHandle
public Object getObjectForHandle(InternalFactHandle handle)
- Specified by:
getObjectForHandle
in interfaceObjectStore
-
reconnect
public InternalFactHandle reconnect(InternalFactHandle handle)
- Specified by:
reconnect
in interfaceObjectStore
-
getHandleForObject
public InternalFactHandle getHandleForObject(Object object)
- Specified by:
getHandleForObject
in interfaceObjectStore
-
getHandleForObjectIdentity
public InternalFactHandle getHandleForObjectIdentity(Object object)
- Specified by:
getHandleForObjectIdentity
in interfaceObjectStore
-
updateHandle
public void updateHandle(InternalFactHandle handle, Object object)
- Specified by:
updateHandle
in interfaceObjectStore
-
addHandle
public void addHandle(InternalFactHandle handle, Object object)
- Specified by:
addHandle
in interfaceObjectStore
-
removeHandle
public void removeHandle(InternalFactHandle handle)
- Specified by:
removeHandle
in interfaceObjectStore
-
iterateObjects
public Iterator<Object> iterateObjects()
Description copied from interface:ObjectStore
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateObjects
in interfaceObjectStore
-
iterateObjects
public Iterator<Object> iterateObjects(org.kie.api.runtime.ObjectFilter filter)
Description copied from interface:ObjectStore
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateObjects
in interfaceObjectStore
-
iterateFactHandles
public Iterator<InternalFactHandle> iterateFactHandles()
Description copied from interface:ObjectStore
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateFactHandles
in interfaceObjectStore
-
iterateFactHandles
public Iterator<InternalFactHandle> iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
Description copied from interface:ObjectStore
This class is not thread safe, changes to the working memory during iteration may give unexpected results- Specified by:
iterateFactHandles
in interfaceObjectStore
-
iterateNegObjects
public Iterator<Object> iterateNegObjects(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
iterateNegObjects
in interfaceObjectStore
-
iterateNegFactHandles
public Iterator<InternalFactHandle> iterateNegFactHandles(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
iterateNegFactHandles
in interfaceObjectStore
-
getStoreForClass
public FactHandleClassStore getStoreForClass(Class<?> clazz)
- Specified by:
getStoreForClass
in interfaceObjectStore
-
clearClassStore
public boolean clearClassStore(Class<?> clazz)
- Specified by:
clearClassStore
in interfaceObjectStore
-
getOrCreateClassStore
public ClassAwareObjectStore.SingleClassStore getOrCreateClassStore(Class<?> clazz)
-
-