|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.writebehind.AbstractWriteBehindCache
org.apache.openjpa.writebehind.SimpleWriteBehindCache
public class SimpleWriteBehindCache
Constructor Summary | |
---|---|
SimpleWriteBehindCache()
|
Method Summary | |
---|---|
List<Exception> |
add(Collection<OpenJPAStateManager> sms)
Add the provided StateManagerImpl s to the cache. |
protected void |
add(OpenJPAStateManager sm)
|
void |
clear()
Remove all entities from the cache. |
boolean |
contains(Object o)
Answer whether the provided object is included in the WriteBehindCache |
WriteBehindCacheKey |
getKey(OpenJPAStateManager sm)
Obtain a cache key for the provided StateManagerImpl . |
int |
getSize()
Obtain the number of entities in the cache. |
protected StateManagerImpl |
getStateManager(Object o)
|
Collection<OpenJPAStateManager> |
getStateManagers()
Obtain the StateManagers currently in the cache. |
void |
initialize(WriteBehindCacheManager manager)
Initialize any resources associated with the given WriteBehindCacheManager . |
boolean |
isEmpty()
Determine whether the cache is empty. |
protected OpenJPAStateManager |
merge(OpenJPAStateManager from,
OpenJPAStateManager into)
|
Methods inherited from class org.apache.openjpa.writebehind.AbstractWriteBehindCache |
---|
getName, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleWriteBehindCache()
Method Detail |
---|
public List<Exception> add(Collection<OpenJPAStateManager> sms)
WriteBehindCache
StateManagerImpl
s to the cache. Mimics the
StoreManager.flush() method. If the StateManagers cannot be added to the
cache or if any exceptions occur they will be returned to the caller in a
collection.
sms
- StateManagerImpls to add.
protected void add(OpenJPAStateManager sm)
public boolean contains(Object o)
WriteBehindCache
o
- Object which may be in the cache
public WriteBehindCacheKey getKey(OpenJPAStateManager sm)
WriteBehindCache
StateManagerImpl
.
sm
- A StateManager
public int getSize()
WriteBehindCache
public Collection<OpenJPAStateManager> getStateManagers()
WriteBehindCache
public void initialize(WriteBehindCacheManager manager)
WriteBehindCache
WriteBehindCacheManager
.
protected StateManagerImpl getStateManager(Object o)
public void clear()
WriteBehindCache
public boolean isEmpty()
WriteBehindCache
protected OpenJPAStateManager merge(OpenJPAStateManager from, OpenJPAStateManager into)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |