public class NameLookupClient extends Object implements Stage, NamingLookup
Modifier and Type | Class and Description |
---|---|
static class |
NameLookupClient.RetryCount |
static class |
NameLookupClient.RetryTimeout |
Constructor and Description |
---|
NameLookupClient(String serverAddr,
int serverPort,
IdentifierFactory factory,
int retryCount,
int retryTimeout,
Cache<Identifier,InetSocketAddress> cache)
Deprecated.
|
NameLookupClient(String serverAddr,
int serverPort,
IdentifierFactory factory,
int retryCount,
int retryTimeout,
Cache<Identifier,InetSocketAddress> cache,
LocalAddressProvider localAddressProvider)
Constructs a naming lookup client
|
NameLookupClient(String serverAddr,
int serverPort,
long timeout,
IdentifierFactory factory,
int retryCount,
int retryTimeout,
Cache<Identifier,InetSocketAddress> cache)
Deprecated.
|
NameLookupClient(String serverAddr,
int serverPort,
long timeout,
IdentifierFactory factory,
int retryCount,
int retryTimeout,
Cache<Identifier,InetSocketAddress> cache,
LocalAddressProvider localAddressProvider)
Constructs a naming lookup client
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes resources
|
InetSocketAddress |
lookup(Identifier id)
Finds an address for an identifier
|
InetSocketAddress |
remoteLookup(Identifier id)
Retrieves an address for an identifier remotely
|
public NameLookupClient(String serverAddr, int serverPort, IdentifierFactory factory, int retryCount, int retryTimeout, Cache<Identifier,InetSocketAddress> cache, LocalAddressProvider localAddressProvider)
serverAddr
- a server addressserverPort
- a server port numberfactory
- an identifier factorycache
- an cache@Deprecated public NameLookupClient(String serverAddr, int serverPort, IdentifierFactory factory, int retryCount, int retryTimeout, Cache<Identifier,InetSocketAddress> cache)
serverAddr
- a server addressserverPort
- a server port numberfactory
- an identifier factorycache
- an cache@Deprecated public NameLookupClient(String serverAddr, int serverPort, long timeout, IdentifierFactory factory, int retryCount, int retryTimeout, Cache<Identifier,InetSocketAddress> cache)
public NameLookupClient(String serverAddr, int serverPort, long timeout, IdentifierFactory factory, int retryCount, int retryTimeout, Cache<Identifier,InetSocketAddress> cache, LocalAddressProvider localAddressProvider)
serverAddr
- a server addressserverPort
- a server port numbertimeout
- request timeout in msfactory
- an identifier factorycache
- an cachepublic InetSocketAddress lookup(Identifier id) throws Exception
lookup
in interface NamingLookup
id
- an identifierIOException
Exception
public InetSocketAddress remoteLookup(Identifier id) throws Exception
id
- an identifierException
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2015 The Apache Software Foundation. All rights reserved.