Class Service
java.lang.Object
io.vertx.ext.consul.Service
- All Implemented Interfaces:
TxnResult
Holds properties of service and node that its containing
- Author:
- Ruslan Sennov
-
Constructor Summary
ConstructorsConstructorDescriptionService()Default constructorService(JsonObject service) Constructor from JSONCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet service addresslongGet the internal index value that represents when the entry was created.getId()Get ID of servicegetMeta()Get arbitrary KV metadata linked to the service instance.longGet the last index that modified this key.getName()Get service namegetNode()Get none nameGet node addressintgetPort()Get service portgetTags()Set list of service tagsinthashCode()setAddress(String address) Set service addresssetCreateIndex(long createIndex) Set the internal index value that represents when the entry was created.Set ID of serviceSpecifies arbitrary KV metadata linked to the service instance.setModifyIndex(long modifyIndex) Set the last index that modified this key.Set service nameSet node namesetNodeAddress(String nodeAddress) Set node addresssetPort(int port) Set service portSet list of service tagstoJson()Convert to JSON
-
Constructor Details
-
Service
public Service()Default constructor -
Service
-
Service
-
-
Method Details
-
toJson
-
getNode
-
setNode
-
getNodeAddress
-
setNodeAddress
-
getId
-
setId
-
getName
-
setName
-
getTags
-
setTags
-
getAddress
-
setAddress
-
getMeta
-
setMeta
-
getPort
public int getPort()Get service port- Returns:
- service port
-
setPort
Set service port- Parameters:
port- service port- Returns:
- reference to this, for fluency
-
getCreateIndex
public long getCreateIndex()Get the internal index value that represents when the entry was created.- Returns:
- the internal index value that represents when the entry was created.
-
setCreateIndex
Set the internal index value that represents when the entry was created.- Parameters:
createIndex- the internal index value that represents when the entry was created.- Returns:
- reference to this, for fluency
-
getModifyIndex
public long getModifyIndex()Get the last index that modified this key.- Returns:
- the last index that modified this key.
-
setModifyIndex
Set the last index that modified this key.- Parameters:
modifyIndex- the last index that modified this key.- Returns:
- reference to this, for fluency
-
getOperationType
- Specified by:
getOperationTypein interfaceTxnResult
-
equals
-
hashCode
-