com.amazon.carbonado.spi
Class StoragePool
java.lang.Object
com.amazon.carbonado.util.AbstractPool<Class,Storage,RepositoryException>
com.amazon.carbonado.spi.StoragePool
public abstract class StoragePool
- extends AbstractPool<Class,Storage,RepositoryException>
A concurrent pool of strongly referenced Storage instances mapped by
Storable type. Storage instances are lazily created and pooled.
- Since:
- 1.2
- Author:
- Brian S O'Neill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StoragePool
public StoragePool()
getStorage
public <S extends Storable> Storage<S> getStorage(Class<S> type)
throws MalformedTypeException,
SupportException,
RepositoryException
- Returns a Storage instance for the given Storable type, which is lazily
created and pooled. If multiple threads are requesting upon the same type
concurrently, at most one thread attempts to lazily create the
Storage. The others wait for it to become available.
- Throws:
MalformedTypeException
SupportException
RepositoryException
create
protected final Storage create(Class type)
throws SupportException,
RepositoryException
- Description copied from class:
AbstractPool
- Return a new value instance.
- Specified by:
create in class AbstractPool<Class,Storage,RepositoryException>
- Throws:
SupportException
RepositoryException
createStorage
protected abstract <S extends Storable> Storage<S> createStorage(Class<S> type)
throws SupportException,
RepositoryException
- Throws:
SupportException
RepositoryException
Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.