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 newStreamsServerInfoinstance.StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments, boolean isLocal)Creates a newStreamsServerInfoinstance.
-
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.booleanequals(Object o)inthashCode()Stringhost()Gets the stream application host.StringhostAndPort()Stringid()Gets the stream application id.booleanisLocal()Checks whether this instance is local.intport()Gets the stream application port.Set<String>stores()Gets the set of store names hosted by this instance.StringtoString()
-
-
-
Constructor Detail
-
StreamsServerInfo
public StreamsServerInfo(String applicationId, String host, int port, Set<String> stores, Set<TopicPartitions> assignments)
Creates a newStreamsServerInfoinstance.- 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 newStreamsServerInfoinstance.- 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
trueif 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.
-
-