public class LobStorageMap extends Object implements LobStorageInterface
Constructor and Description |
---|
LobStorageMap(Database database) |
Modifier and Type | Method and Description |
---|---|
ValueLobDb |
copyLob(ValueLobDb old,
int tableId,
long length)
Copy a lob.
|
Value |
createBlob(InputStream in,
long maxLength)
Create a BLOB object.
|
Value |
createClob(Reader reader,
long maxLength)
Create a CLOB object.
|
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 LobStorageMap(Database database)
public void init()
LobStorageInterface
init
in interface LobStorageInterface
public Value createBlob(InputStream in, long maxLength)
LobStorageInterface
createBlob
in interface LobStorageInterface
in
- the input streammaxLength
- the maximum length (-1 if not known)public Value createClob(Reader reader, long maxLength)
LobStorageInterface
createClob
in interface LobStorageInterface
reader
- the readermaxLength
- the maximum length (-1 if not known)public boolean isReadOnly()
LobStorageInterface
isReadOnly
in interface LobStorageInterface
public ValueLobDb copyLob(ValueLobDb old, int tableId, long length)
LobStorageInterface
copyLob
in interface LobStorageInterface
old
- the old lobtableId
- the new table idlength
- the lengthpublic InputStream getInputStream(ValueLobDb lob, byte[] hmac, long byteCount) throws IOException
LobStorageInterface
getInputStream
in interface LobStorageInterface
lob
- the lob idhmac
- the message authentication code (for remote input streams)byteCount
- the number of bytes to read, or -1 if not knownIOException
public void removeAllForTable(int tableId)
LobStorageInterface
removeAllForTable
in interface LobStorageInterface
tableId
- the table idpublic void removeLob(ValueLobDb lob)
LobStorageInterface
removeLob
in interface LobStorageInterface
lob
- the lobCopyright © 2020 JBoss by Red Hat. All rights reserved.