public class Instance extends java.lang.Object implements java.lang.Comparable<Instance>
Turbine uses the notion of cluster to group Instances together for agggregation.
Turbine also treats the host status as a first class citizen where the status conveys whether the host is ready to serve data etc.
Once Turbine disconnects, all the relevant data from that host is purged from it's aggregated state.
You can also use the attrs to add in free form details about an Instance. e.g ec2-availability-zone, build revision etc.
Then you can also write your own ObservationCriteria implementation to decide how to filter out
relevant hosts to aggregate data from.
| Modifier and Type | Class and Description |
|---|---|
static class |
Instance.UnitTest |
| Constructor and Description |
|---|
Instance(java.lang.String host,
java.lang.String clusterName,
boolean status) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Instance other) |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes() |
java.lang.String |
getCluster() |
java.lang.String |
getHostname() |
int |
hashCode() |
boolean |
isUp() |
java.lang.String |
toString() |
public Instance(java.lang.String host,
java.lang.String clusterName,
boolean status)
host - clusterName - status - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getHostname()
public java.lang.String getCluster()
public boolean isUp()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()