public class Instance
extends java.lang.Object
implements java.io.Serializable
构造器和说明 |
---|
Instance()
用于序列化
|
Instance(java.lang.String service,
java.lang.String host,
int port) |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
address()
服务地址(host:port)
|
java.lang.String |
host()
服务主机
|
static Instance |
local() |
static Instance |
localNew(Signal signal) |
java.util.Map<java.lang.String,java.lang.String> |
meta() |
java.lang.String |
metaGet(java.lang.String name) |
Instance |
metaPut(java.lang.String name,
java.lang.String value) |
Instance |
metaPutAll(java.lang.Iterable<KeyValues<java.lang.String>> data) |
Instance |
metaPutAll(java.util.Map<java.lang.String,java.lang.String> data) |
Instance |
metaRemove(java.lang.String name) |
int |
port()
服务端口
|
java.lang.String |
protocol()
协议(http, ws, tcp...)
|
Instance |
protocol(java.lang.String protocol) |
java.lang.String |
service()
服务名;实例化后不能修改
|
java.lang.String |
serviceAndAddress() |
java.util.List<java.lang.String> |
tags() |
Instance |
tagsAdd(java.lang.String tag) |
Instance |
tagsAddAll(java.util.Collection<java.lang.String> list) |
java.lang.String |
toString() |
java.lang.String |
uri() |
double |
weight() |
Instance |
weight(double weight) |
public Instance()
public Instance(java.lang.String service, java.lang.String host, int port)
public java.lang.String service()
public java.lang.String host()
public int port()
public java.lang.String address()
public java.lang.String serviceAndAddress()
public java.lang.String protocol()
public Instance protocol(java.lang.String protocol)
public java.lang.String uri()
public double weight()
public Instance weight(double weight)
public java.util.Map<java.lang.String,java.lang.String> meta()
public Instance metaPut(java.lang.String name, java.lang.String value)
public java.lang.String metaGet(java.lang.String name)
public Instance metaPutAll(java.util.Map<java.lang.String,java.lang.String> data)
public Instance metaRemove(java.lang.String name)
public java.util.List<java.lang.String> tags()
public Instance tagsAdd(java.lang.String tag)
public Instance tagsAddAll(java.util.Collection<java.lang.String> list)
public static Instance local()
public java.lang.String toString()
toString
在类中 java.lang.Object