Class StreamsServerInfo
- java.lang.Object
-
- io.streamthoughts.azkarra.api.streams.StreamsServerInfo
-
public class StreamsServerInfo extends Object
Class which is used to describe a stream application instance.
-
-
Constructor Summary
Constructors Constructor Description StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments)
Creates a newStreamsServerInfo
instance.StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments, boolean isLocal)
Creates a newStreamsServerInfo
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<TopicPartitions>
assignments()
Gets the set of topic-partitions assigned to this instance.boolean
equals(Object o)
int
hashCode()
String
host()
Gets the stream application host.String
hostAndPort()
String
id()
Gets the stream application id.boolean
isLocal()
Checks whether this instance is local.int
port()
Gets the stream application port.Set<String>
stores()
Gets the set of store names hosted by this instance.String
toString()
-
-
-
Constructor Detail
-
StreamsServerInfo
public StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments)
Creates a newStreamsServerInfo
instance.- Parameters:
host
- the host.port
- the port.stores
- the set of stores managed by this instance.assignments
- the set of topic-partitions assigned to this instance.
-
StreamsServerInfo
public StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments, boolean isLocal)
Creates a newStreamsServerInfo
instance.- Parameters:
host
- the host.port
- the port.stores
- the set of stores managed by this instance.assignments
- the set of topic-partitions assigned to this instance.isLocal
- is storeName local.
-
-
Method Detail
-
id
public String id()
Gets the stream application id.- Returns:
- the string id.
-
host
public String host()
Gets the stream application host.- Returns:
- the string host.
-
port
public int port()
Gets the stream application port.- Returns:
- the string port.
-
isLocal
public boolean isLocal()
Checks whether this instance is local.- Returns:
- the
true
if local.
-
hostAndPort
public String hostAndPort()
-
stores
public Set<String> stores()
Gets the set of store names hosted by this instance.- Returns:
- the set of stores.
-
assignments
public Set<TopicPartitions> assignments()
Gets the set of topic-partitions assigned to this instance.- Returns:
- the set of
TopicPartitions
.
-
-