public final class PropertiesEndpointGroup extends DynamicEndpointGroup
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static PropertiesEndpointGroup |
of(ClassLoader classLoader,
String resourceName,
String endpointKeyPrefix)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the resourceName resource file. |
static PropertiesEndpointGroup |
of(ClassLoader classLoader,
String resourceName,
String endpointKeyPrefix,
int defaultPort)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the resourceName resource file. |
static PropertiesEndpointGroup |
of(Path path,
String endpointKeyPrefix)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the path of a resource file. |
static PropertiesEndpointGroup |
of(Path path,
String endpointKeyPrefix,
int defaultPort)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the path of a resource file. |
static PropertiesEndpointGroup |
of(Properties properties,
String endpointKeyPrefix)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the Properties. |
static PropertiesEndpointGroup |
of(Properties properties,
String endpointKeyPrefix,
int defaultPort)
Creates a new
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the Properties. |
addEndpoint, endpoints, initialEndpointsFuture, removeEndpoint, setEndpointsaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, of, of, orElse, removeListenerpublic static PropertiesEndpointGroup of(ClassLoader classLoader, String resourceName, String endpointKeyPrefix)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the resourceName resource file. The resource file loads
properties whose name starts with endpointKeyPrefix:
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
resourceName - the name of the resource where the list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixpublic static PropertiesEndpointGroup of(ClassLoader classLoader, String resourceName, String endpointKeyPrefix, int defaultPort)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the resourceName resource file. The resource file loads
properties whose name starts with endpointKeyPrefix:
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
resourceName - the name of the resource where the list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixdefaultPort - the default port number to usepublic static PropertiesEndpointGroup of(Properties properties, String endpointKeyPrefix)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the Properties. The Properties is filtered
to properties whose name starts with endpointKeyPrefix:
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
properties - the Properties where the list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixpublic static PropertiesEndpointGroup of(Properties properties, String endpointKeyPrefix, int defaultPort)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the Properties. The Properties is filtered
to properties whose name starts with endpointKeyPrefix:
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
properties - the Properties where the list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixdefaultPort - the default port number to usepublic static PropertiesEndpointGroup of(Path path, String endpointKeyPrefix, int defaultPort)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the path of a resource file. The resource file loads
properties whose name starts with endpointKeyPrefix. The path is watched for further
updates.
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
path - the path of the file where list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixdefaultPort - the default port number to usepublic static PropertiesEndpointGroup of(Path path, String endpointKeyPrefix)
EndpointGroup instance that loads the host names (or IP address) and the port
numbers of the Endpoint from the path of a resource file. The resource file loads
properties whose name starts with endpointKeyPrefix. The path is watched for
further updates.
example.hosts.0=example1.com:36462
example.hosts.1=example2.com:36462
example.hosts.2=example3.com:36462
path - the path of the file where list of Endpoints is loaded fromendpointKeyPrefix - the property name prefixpublic void close()
close in interface EndpointGroupclose in interface SafeCloseableclose in interface AutoCloseableclose in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.