Package org.drools.core.common
Class MapObjectStore
- java.lang.Object
-
- org.drools.core.common.MapObjectStore
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,java.lang.Comparable<org.kie.api.internal.utils.KieService>
,ObjectStore
,org.kie.api.internal.utils.KieService
- Direct Known Subclasses:
IdentityObjectStore
public abstract class MapObjectStore extends java.lang.Object implements java.io.Externalizable, ObjectStore
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MapObjectStore.MapFactHandleClassStore
-
Constructor Summary
Constructors Modifier Constructor Description protected
MapObjectStore(java.util.Map<java.lang.Object,InternalFactHandle> fhMap)
protected
MapObjectStore(Storage<java.lang.Object,InternalFactHandle> fhStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHandle(InternalFactHandle handle, java.lang.Object object)
void
clear()
boolean
clearClassStore(java.lang.Class<?> clazz)
InternalFactHandle
getHandleForObject(java.lang.Object object)
java.lang.Object
getObjectForHandle(InternalFactHandle handle)
FactHandleClassStore
getStoreForClass(java.lang.Class<?> clazz)
boolean
isEmpty()
java.util.Iterator<InternalFactHandle>
iterateFactHandles()
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsjava.util.Iterator<InternalFactHandle>
iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsjava.util.Iterator<InternalFactHandle>
iterateNegFactHandles(org.kie.api.runtime.ObjectFilter filter)
java.util.Iterator<java.lang.Object>
iterateNegObjects(org.kie.api.runtime.ObjectFilter filter)
java.util.Iterator<java.lang.Object>
iterateObjects()
This class is not thread safe, changes to the working memory during iteration may give unexpected resultsjava.util.Iterator<java.lang.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(java.io.ObjectInput in)
InternalFactHandle
reconnect(InternalFactHandle handle)
void
removeHandle(InternalFactHandle handle)
int
size()
void
updateHandle(InternalFactHandle handle, java.lang.Object object)
void
writeExternal(java.io.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
-
MapObjectStore
protected MapObjectStore(java.util.Map<java.lang.Object,InternalFactHandle> fhMap)
-
MapObjectStore
protected MapObjectStore(Storage<java.lang.Object,InternalFactHandle> fhStorage)
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.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 java.lang.Object getObjectForHandle(InternalFactHandle handle)
- Specified by:
getObjectForHandle
in interfaceObjectStore
-
reconnect
public InternalFactHandle reconnect(InternalFactHandle handle)
- Specified by:
reconnect
in interfaceObjectStore
-
getHandleForObject
public InternalFactHandle getHandleForObject(java.lang.Object object)
- Specified by:
getHandleForObject
in interfaceObjectStore
-
updateHandle
public void updateHandle(InternalFactHandle handle, java.lang.Object object)
- Specified by:
updateHandle
in interfaceObjectStore
-
addHandle
public void addHandle(InternalFactHandle handle, java.lang.Object object)
- Specified by:
addHandle
in interfaceObjectStore
-
removeHandle
public void removeHandle(InternalFactHandle handle)
- Specified by:
removeHandle
in interfaceObjectStore
-
iterateObjects
public java.util.Iterator<java.lang.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 java.util.Iterator<java.lang.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 java.util.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 java.util.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 java.util.Iterator<java.lang.Object> iterateNegObjects(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
iterateNegObjects
in interfaceObjectStore
-
iterateNegFactHandles
public java.util.Iterator<InternalFactHandle> iterateNegFactHandles(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
iterateNegFactHandles
in interfaceObjectStore
-
getStoreForClass
public FactHandleClassStore getStoreForClass(java.lang.Class<?> clazz)
- Specified by:
getStoreForClass
in interfaceObjectStore
-
clearClassStore
public boolean clearClassStore(java.lang.Class<?> clazz)
- Specified by:
clearClassStore
in interfaceObjectStore
-
-