public class FCConfigBuilder.TopicBuilder extends Object
| Constructor and Description |
|---|
FCConfigBuilder.TopicBuilder(String transportName) |
| Modifier and Type | Method and Description |
|---|---|
FCConfigBuilder.TopicBuilder |
datagramSize(int sizBytes)
set datagram size on current transport.
|
FCConfigBuilder |
end() |
FCConfigBuilder.TopicBuilder |
membership(String topicname,
int topicId)
add predefined FCMembership topic service.
|
FCConfigBuilder.TopicBuilder |
setOpenCalls(int maxOpen,
long timeoutMS) |
FCConfigBuilder.TopicBuilder |
setRequestRespOptions(int maxOpenRequests,
int timeOutMillis)
set's request respons options on last added topic.
|
FCConfigBuilder.TopicBuilder |
setSendQueuePercentage(int percentageOfSendHistory) |
FCConfigBuilder.TopicBuilder |
topic(String topicname,
int topicId)
add a topic with default values (8Mb/second rate limit, 40Mb send history).
|
FCConfigBuilder.TopicBuilder |
topic(String topicname,
int topicId,
int maxDatagramsPerSecond)
add a topic
|
FCConfigBuilder.TopicBuilder |
topic(String topicname,
int topicId,
int maxDatagramsPerSecond,
int maxGCPauseSeconds)
add a topic
|
public FCConfigBuilder.TopicBuilder(String transportName)
public FCConfigBuilder.TopicBuilder topic(String topicname, int topicId)
topicname - - name used to retrieve topic related stuff later ontopicId - - 0 .. FCDispatcher.MAX_NUM_TOPICS (256 currently)public FCConfigBuilder.TopicBuilder topic(String topicname, int topicId, int maxDatagramsPerSecond)
topicname - - name used to retrieve topic related stuff later ontopicId - - 0 .. FCDispatcher.MAX_NUM_TOPICS (256 currently)maxDatagramsPerSecond - - a DataGram has a default size of 8k, so a value of 1000 sets 8MByte rate limit
note that history size is by default 5*send ratepublic FCConfigBuilder.TopicBuilder topic(String topicname, int topicId, int maxDatagramsPerSecond, int maxGCPauseSeconds)
topicname - - name used to retrieve topic related stuff later ontopicId - - 0 .. FCDispatcher.MAX_NUM_TOPICS (256 currently)maxDatagramsPerSecond - - a DataGram has a default size of 8k, so a value of 1000 sets 8MByte rate limit
note that off heap history size is set to maxGCPauseSeconds * send rate. This consume
a lot of memory in case you set up many topics with high throughputmaxGCPauseSeconds - - the maximum GC pause you expect from any receiver. Because the receiver misses packets in case of GC,
each sender has to keep a send history spanning the maximum GC pause time, else the receivers might
get dropped (unrecoverable packet loss).public FCConfigBuilder.TopicBuilder setOpenCalls(int maxOpen, long timeoutMS)
public FCConfigBuilder.TopicBuilder setSendQueuePercentage(int percentageOfSendHistory)
public FCConfigBuilder.TopicBuilder setRequestRespOptions(int maxOpenRequests, int timeOutMillis)
maxOpenRequests - - the number of concurrent unresponded requests. If this is exceeded, calling remote methods with
result will block until new slots get avaiable either by timeout or incoming responses.timeOutMillis - - time until waiting for a response is given up. Since FastCast provides 1:N request/responses one
can receive several responses (in different thread is configured so).
In case a receiver is not interested in further responses, it should call 'done' on the
FCFutureResultHandler future object.public FCConfigBuilder.TopicBuilder membership(String topicname, int topicId)
topicname - topicId - public FCConfigBuilder end()
public FCConfigBuilder.TopicBuilder datagramSize(int sizBytes)
sizBytes - Copyright © 2014. All rights reserved.