|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SocketAddressProvider
The SocketAddressProvider is an interface that serves as a means to provide addresses to a consumer. Simple implementations could be backed by a static list; more complex ones could use dynamic discovery protocols.
SocketAddressProvider implementations must exercise extreme caution since any delay with return or unhandled exception will cause a delay or complete shutdown of the corresponding service.
Implementations that involve more expensive operations (e.g. network fetch) may choose to do so asychronously by extending RefreshableAddressProvider
.
Method Summary | |
---|---|
void |
accept() This method should be called by the client immediately after it determines that it can successfully use an address returned by the getNextAddress() method. |
boolean |
equals(java.lang.Object o) SocketAddressProvider instances are considered equivalent iff they consistently produce the same resulting set of addresses. |
java.net.SocketAddress |
getNextAddress() Obtain a next available address to use. |
int |
hashCode() Return the hash code for this SocketAddressProvider. |
void |
reject(java.lang.Throwable eCause) This method should be called by the client immediately after it determines that an attempt to use an address returned by the getNextAddress() method has failed. |
Method Detail |
---|
java.net.SocketAddress getNextAddress()
accept()
method.void accept()
getNextAddress()
method.void reject(java.lang.Throwable eCause)
getNextAddress()
method has failed.eCause
- (optional) an exception that carries the reason why the the caller rejected the previously returned addressboolean equals(java.lang.Object o)
Note: the general contract of hashCode and equals() should be preserved; AddressProviders that are "equal" should produce the same hashCode.
o
- the Object to compare this SocketAddressProvider to for equalityint hashCode()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |