|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.edg.info.InstanceBase
org.edg.info.DeclarableInstance
org.edg.info.InsertableInstance
Superclass for all producers that have "insertable" behaviour.
Field Summary |
Fields inherited from class org.edg.info.InstanceBase |
DEFAULT_TERMINATION_INTERVAL_MS, s_maxTerminationInterval, s_minTerminationInterval |
Method Summary | |
boolean |
canDestroy()
Determines if this insertable can be destroyed. |
void |
declareAsArchiver()
Sets the declareAsArchiverFlag to true |
void |
declareTable(java.lang.String tableName,
java.lang.String predicate,
int hrpSec,
int lrpSec)
Declares a table with a predicate and history/latest retention period. |
void |
destroy()
Tidies up any open resources. |
java.util.HashMap |
getConsumerConnections()
|
int |
getHistoryRetentionPeriod(java.lang.String tableName)
Gets the HistoryRetentionPeriod. |
long |
getLastStreamDurationMillis()
|
int |
getLatestRetentionPeriod(java.lang.String tableName)
Gets the LatestRetentionPeriod. |
int |
getMaxBufferSize()
|
long |
getMinRetentionPeriod()
Deprecated. |
java.util.HashMap |
getQueueTracker()
|
java.util.Hashtable |
getRetentionPeriods()
|
long |
getStreamDurationMillis()
|
void |
insert(java.lang.String[] sqlInsert)
Inserts a number of tuples. |
boolean |
isAutoInsertTimestampEnabled()
Returns state of autoInsertTimestamp. |
void |
setAutoInsertTimestamp(boolean autoInsertTimestampEnabled)
Sets the autoInsertTimestampEnabled. |
void |
setMinRetentionPeriod(long minRetentionPeriodMS)
Deprecated. |
void |
startStreaming(org.edg.info.system.StreamRequest request,
java.lang.String select,
int flags)
Creates a new socket connection back to the consumer that is making the request and adds this to the list of consumer connections. |
void |
stopStreaming(org.edg.info.system.StreamRequest request)
Stops streaming to consumer specified by request. |
void |
streamTuples()
Sends pending tuples for all tables in this Producer to all registered Consumers. |
Methods inherited from class org.edg.info.DeclarableInstance |
declareTable, getClientHostName, getProducerType, setClientHostName, undeclareTable, updateRegistry |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void setAutoInsertTimestamp(boolean autoInsertTimestampEnabled) throws org.glite.rgma.system.RGMAException
autoInsertTimestampEnabled
- The autoInsertTimestampEnabled to set
org.glite.rgma.system.RGMAException
- Thrown if not connected.public boolean isAutoInsertTimestampEnabled()
org.glite.rgma.system.RGMAException
- Thrown if the remote connection fails.public void setMinRetentionPeriod(long minRetentionPeriodMS) throws org.glite.rgma.system.RGMAException
minRetentionPeriodMS
- Minimum retention period (in ms).
org.glite.rgma.system.RGMAException
- Thrown if minRetP < 0 or instance isn't
connectedpublic long getMinRetentionPeriod() throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
- Thrown if not connected.public int getLatestRetentionPeriod(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
- Thrown if not connected.public int getHistoryRetentionPeriod(java.lang.String tableName) throws org.glite.rgma.system.RGMAException
org.glite.rgma.system.RGMAException
- Thrown if not connected.public boolean canDestroy()
canDestroy
in class InstanceBase
true
if this insertable can be destroyed.public void destroy()
destroy
in class DeclarableInstance
public void declareAsArchiver()
public void declareTable(java.lang.String tableName, java.lang.String predicate, int hrpSec, int lrpSec) throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMAInternalException
tableName
- Name of table to declarepredicate
- Predicate (can be empty string)hrpSec
- History retention period (in seconds).lrpSec
- Latest retention period (in seconds).
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAInternalException
public void insert(java.lang.String[] sqlInsert) throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMABufferFullException, org.glite.rgma.system.RGMAInternalException
sqlInsert
- SQL INSERT statements.
org.glite.rgma.system.RGMAException
- Thrown if not connected, INSERT not valid, table
not declared, Schema could not be contacted, error in date/time
in Tuple or error in tuple columns.
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMABufferFullException
org.glite.rgma.system.RGMAInternalException
public void streamTuples() throws org.glite.rgma.system.RGMAInternalException
org.glite.rgma.system.RGMAInternalException
public void startStreaming(org.edg.info.system.StreamRequest request, java.lang.String select, int flags) throws org.glite.rgma.system.RGMAUserException, org.glite.rgma.system.RGMAInternalException
request
- Stream requestselect
- SQL SELECT statementflags
- Consumer flags
org.glite.rgma.system.RGMAException
- Thrown if flags aren't valid, aren't CONTINUOUS,
if not connected, if SELECT statement is invalid, if table
hasn't been declared, or if queue operation fails.
org.glite.rgma.system.RGMAUserException
org.glite.rgma.system.RGMAInternalException
public void stopStreaming(org.edg.info.system.StreamRequest request)
request
- Stream request
org.glite.rgma.system.RGMAException
- Thrown if not connectedpublic int getMaxBufferSize()
public java.util.HashMap getQueueTracker()
public java.util.Hashtable getRetentionPeriods()
public java.util.HashMap getConsumerConnections()
public long getStreamDurationMillis()
public long getLastStreamDurationMillis()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |