Package org.drools.persistence.api
Interface PersistenceContext
-
public interface PersistenceContext
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()PersistentSessionfindSession(java.lang.Long id)PersistentWorkItemfindWorkItem(java.lang.Long id)booleanisOpen()voidjoinTransaction()voidlock(PersistentWorkItem workItem)This method pessimistically locks theWorkItemInfoinstancePersistentWorkItemmerge(PersistentWorkItem workItem)PersistentSessionpersist(PersistentSession session)This method persists the entity.PersistentWorkItempersist(PersistentWorkItem workItem)voidremove(PersistentSession sessionInfo)voidremove(PersistentWorkItem workItem)
-
-
-
Method Detail
-
persist
PersistentSession persist(PersistentSession session)
This method persists the entity. If pessimistic locking is being used, the method will also immediately lock the entity and return a reference to the locked entity.- Parameters:
sessionInfo- TheSessionInfoinstance representing the state of theKieSession- Returns:
- sessionInfo a reference to the persisted
SessionInfoinstance.
-
findSession
PersistentSession findSession(java.lang.Long id)
-
remove
void remove(PersistentSession sessionInfo)
-
isOpen
boolean isOpen()
-
joinTransaction
void joinTransaction()
-
close
void close()
-
persist
PersistentWorkItem persist(PersistentWorkItem workItem)
-
findWorkItem
PersistentWorkItem findWorkItem(java.lang.Long id)
-
remove
void remove(PersistentWorkItem workItem)
-
lock
void lock(PersistentWorkItem workItem)
This method pessimistically locks theWorkItemInfoinstance- Parameters:
sessionInfo- The persistent representation of aWorkItem
-
merge
PersistentWorkItem merge(PersistentWorkItem workItem)
-
-