public class LobStorageFrontend extends java.lang.Object implements LobStorageInterface
| Modifier and Type | Field and Description |
|---|---|
static int |
TABLE_ID_SESSION_VARIABLE
The table id for session variables (LOBs not assigned to a table).
|
static int |
TABLE_RESULT
The table id for result sets.
|
static int |
TABLE_TEMP
The table id for temporary objects (not assigned to any object).
|
| Constructor and Description |
|---|
LobStorageFrontend(DataHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
ValueLobDb |
copyLob(ValueLobDb old,
int tableId,
long length)
Copy a lob.
|
Value |
createBlob(java.io.InputStream in,
long maxLength)
Create a BLOB object.
|
Value |
createClob(java.io.Reader reader,
long maxLength)
Create a CLOB object.
|
java.io.InputStream |
getInputStream(ValueLobDb lob,
byte[] hmac,
long byteCount)
Get the input stream for the given lob.
|
void |
init()
Initialize the lob storage.
|
boolean |
isReadOnly()
Whether the storage is read-only
|
void |
removeAllForTable(int tableId)
Remove all LOBs for this table.
|
void |
removeLob(ValueLobDb lob)
Delete a LOB (from the database, if it is stored there).
|
public static final int TABLE_ID_SESSION_VARIABLE
public static final int TABLE_TEMP
public static final int TABLE_RESULT
public LobStorageFrontend(DataHandler handler)
public void removeLob(ValueLobDb lob)
LobStorageInterfaceremoveLob in interface LobStorageInterfacelob - the lobpublic java.io.InputStream getInputStream(ValueLobDb lob, byte[] hmac, long byteCount) throws java.io.IOException
getInputStream in interface LobStorageInterfacelob - the lobhmac - the message authentication code (for remote input streams)byteCount - the number of bytes to read, or -1 if not knownjava.io.IOExceptionpublic boolean isReadOnly()
LobStorageInterfaceisReadOnly in interface LobStorageInterfacepublic ValueLobDb copyLob(ValueLobDb old, int tableId, long length)
LobStorageInterfacecopyLob in interface LobStorageInterfaceold - the old lobtableId - the new table idlength - the lengthpublic void removeAllForTable(int tableId)
LobStorageInterfaceremoveAllForTable in interface LobStorageInterfacetableId - the table idpublic Value createBlob(java.io.InputStream in, long maxLength)
LobStorageInterfacecreateBlob in interface LobStorageInterfacein - the input streammaxLength - the maximum length (-1 if not known)public Value createClob(java.io.Reader reader, long maxLength)
createClob in interface LobStorageInterfacereader - the readermaxLength - the maximum length (-1 if not known)public void init()
LobStorageInterfaceinit in interface LobStorageInterface