Package org.eclipse.emf.cdo.spi.server
Class StoreAccessorPool
java.lang.Object
org.eclipse.emf.cdo.spi.server.StoreAccessorPool
If the meaning of this type isn't clear, there really should be more of a description here...
- Since:
- 2.0
- Author:
- Eike Stepper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStoreAccessor
(StoreAccessorBase accessor) Passivates the givenstore accessor
and adds it to this pool if the pool size is smaller than thecapacity
, or disposes of the store accessor otherwise.void
dispose()
Deactivates all containedstore accessors
and clears this pool.protected void
disposeStoreAccessor
(StoreAccessorBase accessor) int
getStore()
removeStoreAccessor
(Object context) Returns astore accessor
from this pool if one is available, ornull
otherwise.protected void
retainStoreAccessors
(int targetSize) void
setCapacity
(int capacity)
-
Field Details
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY- Since:
- 4.2
- See Also:
-
-
Constructor Details
-
StoreAccessorPool
-
-
Method Details
-
getStore
-
getContext
-
getCapacity
public int getCapacity()- Since:
- 4.2
-
setCapacity
public void setCapacity(int capacity) - Since:
- 4.2
-
addStoreAccessor
Passivates the givenstore accessor
and adds it to this pool if the pool size is smaller than thecapacity
, or disposes of the store accessor otherwise.- Since:
- 4.0
-
removeStoreAccessor
Returns astore accessor
from this pool if one is available, ornull
otherwise. If a store accessor is available it is removed from this pool and its unpassivate method is called.- Since:
- 4.0
-
dispose
public void dispose()Deactivates all containedstore accessors
and clears this pool. -
retainStoreAccessors
protected void retainStoreAccessors(int targetSize) - Since:
- 4.2
-
disposeStoreAccessor
- Since:
- 4.2
-