class TupleConnections extends Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
TupleConnections.Reconnector
attempt to reconnect the TupleConnections
|
(package private) class |
TupleConnections.StreamTupleConnection
Stream tuple connection
|
Constructor and Description |
---|
TupleConnections(StreamBaseClient client,
boolean haModeOn)
Constructor
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addConnection(StreamBaseURI uri,
StreamProperties props)
Add a connection
|
void |
addConnectionStatusCallback(ConnectionStatusCallback callback)
Add connection status callback
|
(package private) void |
close()
Close all connections
|
void |
enableHeartbeating()
Enable hearbeat
|
(package private) void |
enqueueTupleBuffer(StreamBaseClient.SerializedTupleBuffer buffer,
boolean hasMore)
Private version of enqueue that does all of the work.
|
(package private) int |
getConnectionCount()
Get number of connections
|
(package private) List<TupleConnections.StreamTupleConnection> |
getConnections(StreamProperties props)
Return an unmodifiable list of List<StreamConnection>
|
boolean |
isConnected()
Returns true if this TupleConnections has any live connections to a
server.
|
(package private) void |
processLeadershipStatusChange(TupleConnection connection,
Constants.LeadershipStatus newStatus)
Process leadership status change
|
void |
removeConnectionStatusCallback(ConnectionStatusCallback callback)
Remove connection callback status
|
void |
setQuiescentLimit(long timeoutMS)
Set connection timeout
|
(package private) void |
tupleConnectionConnected(TupleConnection conn)
Fire connected notifier
|
(package private) void |
tupleConnectionDisconnected(TupleConnection conn,
String reason)
Fire disconnected notifier
|
TupleConnections(StreamBaseClient client, boolean haModeOn)
client
- ClienthaModeOn
- true if HA enabled, false otherwisevoid addConnection(StreamBaseURI uri, StreamProperties props) throws StreamBaseException
uri
- URIprops
- Stream propertiesStreamBaseException
- Error adding connectionvoid close()
public boolean isConnected()
List<TupleConnections.StreamTupleConnection> getConnections(StreamProperties props) throws StreamBaseException
props
- Stream propertiesStreamBaseException
void tupleConnectionConnected(TupleConnection conn)
conn
- Connectionvoid tupleConnectionDisconnected(TupleConnection conn, String reason)
conn
- Connectionreason
- Disconnect reasonint getConnectionCount()
public void enableHeartbeating()
public void setQuiescentLimit(long timeoutMS) throws StreamBaseException
timeoutMS
- Timeout in millisecondsStreamBaseException
- Error setting timeoutvoid processLeadershipStatusChange(TupleConnection connection, Constants.LeadershipStatus newStatus)
connection
- ConnectionnewStatus
- New statuspublic void addConnectionStatusCallback(ConnectionStatusCallback callback)
callback
- Callbackpublic void removeConnectionStatusCallback(ConnectionStatusCallback callback)
callback
- Callbackvoid enqueueTupleBuffer(StreamBaseClient.SerializedTupleBuffer buffer, boolean hasMore) throws StreamBaseException
buffer
- Tuple bufferhasMore
- true if more tuples, false otherwiseStreamBaseException
- thrown on network or other errorsCopyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.