Package org.eclipse.emf.cdo.spi.server
Class StoreAccessorPool
- java.lang.Object
- 
- org.eclipse.emf.cdo.spi.server.StoreAccessorPool
 
- 
 public class StoreAccessorPool extends java.lang.ObjectIf the meaning of this type isn't clear, there really should be more of a description here...- Since:
- 2.0
- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_CAPACITY
 - 
Constructor SummaryConstructors Constructor Description StoreAccessorPool(IStore store, java.lang.Object context)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStoreAccessor(StoreAccessorBase storeAccessor)Passivates the givenstore accessorand adds it to this pool if the pool size is smaller than thecapacity, or disposes of the store accessor otherwise.voiddispose()Deactivates all containedstore accessorsand clears this pool.protected voiddisposeStoreAccessor(StoreAccessorBase accessor)intgetCapacity()java.lang.ObjectgetContext()IStoregetStore()StoreAccessorBaseremoveStoreAccessor(java.lang.Object context)Returns astore accessorfrom this pool if one is available, ornullotherwise.protected voidretainStoreAccessors(int targetSize)voidsetCapacity(int capacity)
 
- 
- 
- 
Field Detail- 
DEFAULT_CAPACITYpublic static final int DEFAULT_CAPACITY - Since:
- 4.2
- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
StoreAccessorPoolpublic StoreAccessorPool(IStore store, java.lang.Object context) 
 
- 
 - 
Method Detail- 
getStorepublic IStore getStore() 
 - 
getContextpublic java.lang.Object getContext() 
 - 
getCapacitypublic int getCapacity() - Since:
- 4.2
 
 - 
setCapacitypublic void setCapacity(int capacity) - Since:
- 4.2
 
 - 
addStoreAccessorpublic void addStoreAccessor(StoreAccessorBase storeAccessor) Passivates the givenstore accessorand adds it to this pool if the pool size is smaller than thecapacity, or disposes of the store accessor otherwise.- Since:
- 4.0
 
 - 
removeStoreAccessorpublic StoreAccessorBase removeStoreAccessor(java.lang.Object context) Returns astore accessorfrom this pool if one is available, ornullotherwise. If a store accessor is available it is removed from this pool and its unpassivate method is called.- Since:
- 4.0
 
 - 
disposepublic void dispose() Deactivates all containedstore accessorsand clears this pool.
 - 
retainStoreAccessorsprotected void retainStoreAccessors(int targetSize) - Since:
- 4.2
 
 - 
disposeStoreAccessorprotected void disposeStoreAccessor(StoreAccessorBase accessor) - Since:
- 4.2
 
 
- 
 
-