public class Service extends Object implements TxnResult
Constructor and Description |
---|
Service()
Default constructor
|
Service(JsonObject service)
Constructor from JSON
|
Service(Service other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAddress()
Get service address
|
long |
getCreateIndex()
Get the internal index value that represents when the entry was created.
|
String |
getId()
Get ID of service
|
Map<String,String> |
getMeta()
Get arbitrary KV metadata linked to the service instance.
|
long |
getModifyIndex()
Get the last index that modified this key.
|
String |
getName()
Get service name
|
String |
getNode()
Get none name
|
String |
getNodeAddress()
Get node address
|
TxnOperationType |
getOperationType() |
int |
getPort()
Get service port
|
List<String> |
getTags()
Set list of service tags
|
int |
hashCode() |
Service |
setAddress(String address)
Set service address
|
Service |
setCreateIndex(long createIndex)
Set the internal index value that represents when the entry was created.
|
Service |
setId(String id)
Set ID of service
|
Service |
setMeta(Map<String,String> meta)
Specifies arbitrary KV metadata linked to the service instance.
|
Service |
setModifyIndex(long modifyIndex)
Set the last index that modified this key.
|
Service |
setName(String name)
Set service name
|
Service |
setNode(String node)
Set node name
|
Service |
setNodeAddress(String nodeAddress)
Set node address
|
Service |
setPort(int port)
Set service port
|
Service |
setTags(List<String> tags)
Set list of service tags
|
JsonObject |
toJson()
Convert to JSON
|
public Service()
public Service(Service other)
other
- the one to copypublic Service(JsonObject service)
service
- the JSONpublic JsonObject toJson()
public String getNode()
public Service setNode(String node)
node
- node namepublic String getNodeAddress()
public Service setNodeAddress(String nodeAddress)
nodeAddress
- node addresspublic String getId()
public Service setId(String id)
id
- ID of servicepublic String getName()
public Service setName(String name)
name
- service namepublic Service setTags(List<String> tags)
tags
- list of service tagspublic String getAddress()
public Service setAddress(String address)
address
- service addresspublic Map<String,String> getMeta()
public Service setMeta(Map<String,String> meta)
meta
- arbitrary KV metadatapublic int getPort()
public Service setPort(int port)
port
- service portpublic long getCreateIndex()
public Service setCreateIndex(long createIndex)
createIndex
- the internal index value that represents when the entry was created.public long getModifyIndex()
public Service setModifyIndex(long modifyIndex)
modifyIndex
- the last index that modified this key.public TxnOperationType getOperationType()
getOperationType
in interface TxnResult
Copyright © 2024 Eclipse. All rights reserved.