|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.spi.LobEngine
public class LobEngine
Complete Lob support for repositories, although repository is responsible for binding Lob properties to this engine. Lobs are referenced by locators, which are non-zero long integers. A zero locator is equivalent to null.
getSupportTrigger(Class, int)| Constructor Summary | |
|---|---|
LobEngine(Repository lobRepo,
Repository locatorRepo)
|
|
LobEngine(Repository lobRepo,
SequenceValueProducer locatorSequenceProducer)
|
|
| Method Summary | ||
|---|---|---|
Blob |
createNewBlob(int blockSize)
Returns a new Blob whose length is zero. |
|
Clob |
createNewClob(int blockSize)
Returns a new Clob whose length is zero. |
|
void |
deleteLob(Lob lob)
Deletes Lob data, freeing up all space consumed by it. |
|
void |
deleteLob(long locator)
Deletes Lob data, freeing up all space consumed by it. |
|
Blob |
getBlobValue(long locator)
Loads a Blob value, without checking if it exists or not. |
|
Clob |
getClobValue(long locator)
Loads a Clob value, without checking if it exists or not. |
|
long |
getLocator(Lob lob)
Returns the locator for the given Lob, or zero if null. |
|
|
getSupportTrigger(Class<S> type,
int blockSize)
Returns a Trigger for binding to this LobEngine. |
|
static
|
hasLobs(Class<S> type)
|
|
void |
setBlobValue(long locator,
Blob data)
Stores a value into a Blob, replacing anything that was there before. |
|
void |
setBlobValue(long locator,
InputStream data)
Stores a value into a Blob, replacing anything that was there before. |
|
void |
setClobValue(long locator,
Clob data)
Stores a value into a Clob, replacing anything that was there before. |
|
void |
setClobValue(long locator,
Reader data)
Stores a value into a Clob, replacing anything that was there before. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LobEngine(Repository lobRepo,
Repository locatorRepo)
throws RepositoryException
lobRepo - storage for Lobs - should not be replicatedlocatorRepo - storage for producing unique values for Lob locators
- should be root repository
RepositoryException
public LobEngine(Repository lobRepo,
SequenceValueProducer locatorSequenceProducer)
throws RepositoryException
lobRepo - storage for Lobs - should not be replicatedlocatorSequenceProducer - source of unique values for Lob locators
RepositoryException| Method Detail |
|---|
public static <S extends Storable> boolean hasLobs(Class<S> type)
public Blob createNewBlob(int blockSize)
throws PersistException
blockSize - block size (in bytes) to use
PersistException
public Clob createNewClob(int blockSize)
throws PersistException
blockSize - block size (in bytes) to use
PersistExceptionpublic long getLocator(Lob lob)
ClassCastException - if Lob is unrecognized
public void deleteLob(long locator)
throws PersistException
PersistException
public void deleteLob(Lob lob)
throws PersistException
PersistExceptionpublic Blob getBlobValue(long locator)
locator - lob locator as returned by getLocator
public Clob getClobValue(long locator)
locator - lob locator as returned by getLocator
public void setBlobValue(long locator,
Blob data)
throws PersistException,
IOException
locator - lob locator as created by createNewBlobdata - source of data for Blob, which may be null to delete
IllegalArgumentException - if locator is zero
PersistException
IOException
public void setBlobValue(long locator,
InputStream data)
throws PersistException,
IOException
locator - lob locator as created by createNewBlobdata - source of data for Blob, which may be null to delete
IllegalArgumentException - if locator is zero
PersistException
IOException
public void setClobValue(long locator,
Clob data)
throws PersistException,
IOException
locator - lob locator as created by createNewClobdata - source of data for Clob, which may be null to delete
IllegalArgumentException - if locator is zero
PersistException
IOException
public void setClobValue(long locator,
Reader data)
throws PersistException,
IOException
locator - lob locator as created by createNewClobdata - source of data for Clob, which may be null to delete
IllegalArgumentException - if locator is zero
PersistException
IOException
public <S extends Storable> Trigger<S> getSupportTrigger(Class<S> type,
int blockSize)
type - type of Storable to create trigger forblockSize - block size to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||