com.metamatrix.common.types
Class Streamable<T>

java.lang.Object
  extended by com.metamatrix.common.types.Streamable<T>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BlobType, ClobType, XMLType

public abstract class Streamable<T>
extends java.lang.Object
implements java.io.Serializable

A large value object which can be streamable in chunks of data each time

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.

A Persistent stream id is Tuple source id under which the server *may* have saved the data to disk in buffer manager. In case of XML it is saved however in case of Clobs and Blobs it is not saved yet. This id is used by the process worker to in case the reference object has lost its state and we need to reinsate the object from the disk.

See Also:
Serialized Form

Field Summary
static java.lang.String FORCE_STREAMING
           
protected  T reference
           
static int STREAMING_BATCH_SIZE_IN_BYTES
           
 
Constructor Summary
Streamable()
           
Streamable(T reference)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getPersistenceStreamId()
           
 T getReference()
           
 java.lang.String getReferenceStreamId()
           
 void setPersistenceStreamId(java.lang.String id)
           
 void setReference(T reference)
           
 void setReferenceStreamId(java.lang.String id)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORCE_STREAMING

public static final java.lang.String FORCE_STREAMING
See Also:
Constant Field Values

STREAMING_BATCH_SIZE_IN_BYTES

public static final int STREAMING_BATCH_SIZE_IN_BYTES
See Also:
Constant Field Values

reference

protected transient T reference
Constructor Detail

Streamable

public Streamable()

Streamable

public Streamable(T reference)
Method Detail

getReference

public T getReference()

setReference

public void setReference(T reference)

getReferenceStreamId

public java.lang.String getReferenceStreamId()

setReferenceStreamId

public void setReferenceStreamId(java.lang.String id)

getPersistenceStreamId

public java.lang.String getPersistenceStreamId()

setPersistenceStreamId

public void setPersistenceStreamId(java.lang.String id)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2009. All Rights Reserved.