public abstract class Streamable<T> extends Object implements Externalizable
A reference stream id is tuple source id for a Streamble object where the object is in buffer manager, but the contents will never be written to disk; this is the ID that client needs to reference to get the chunk of data.
| Modifier and Type | Field and Description |
|---|---|
static Charset |
CHARSET |
static String |
ENCODING |
protected long |
length |
protected T |
reference |
static int |
STREAMING_BATCH_SIZE_IN_BYTES |
| Constructor and Description |
|---|
Streamable() |
Streamable(T reference) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLength()
Returns the cached length.
|
T |
getReference() |
String |
getReferenceStreamId() |
protected boolean |
isBinary() |
long |
length() |
void |
readExternal(ObjectInput in) |
protected abstract void |
readReference(ObjectInput in) |
void |
setReference(T reference) |
void |
setReferenceStreamId(String id) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
protected abstract void |
writeReference(DataOutput out) |
public static final String ENCODING
public static final Charset CHARSET
public static final int STREAMING_BATCH_SIZE_IN_BYTES
protected transient volatile T reference
protected long length
public Streamable()
public Streamable(T reference)
public long getLength()
public long length()
throws SQLException
SQLExceptionpublic T getReference()
public void setReference(T reference)
public String getReferenceStreamId()
public void setReferenceStreamId(String id)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected abstract void readReference(ObjectInput in) throws IOException
IOExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionprotected boolean isBinary()
protected abstract void writeReference(DataOutput out) throws IOException
IOExceptionCopyright © 2020. All rights reserved.