Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.net
Class CompositeAddressProvider.SingleProvider

java.lang.Object
  extended by com.tangosol.net.CompositeAddressProvider.SingleProvider

All Implemented Interfaces:
AddressProvider, SocketAddressProvider
Enclosing class:
CompositeAddressProvider

protected class CompositeAddressProvider.SingleProvider
extends java.lang.Object
implements AddressProvider

AddressProvider wrapper for a single address dynamically added to this AddressSet.


Field Summary
protected  java.net.InetSocketAddress m_address
          The single address that this AddressProvider represents.
protected  boolean m_fExhausted
          Is this AddressProvider exhausted?

 

Constructor Summary
protected CompositeAddressProvider.SingleProvider(java.net.InetSocketAddress address)
          Constructor

 

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 SocketAddressProvider.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.InetSocketAddress getNextAddress()
          Covariant of SocketAddressProvider.getNextAddress() which returns an InetSocketAddress.
 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 SocketAddressProvider.getNextAddress() method has failed.

 

Field Detail

m_address

protected java.net.InetSocketAddress m_address
The single address that this AddressProvider represents.

m_fExhausted

protected boolean m_fExhausted
Is this AddressProvider exhausted?

Constructor Detail

CompositeAddressProvider.SingleProvider

protected CompositeAddressProvider.SingleProvider(java.net.InetSocketAddress address)
Constructor

Method Detail

getNextAddress

public java.net.InetSocketAddress getNextAddress()
Covariant of SocketAddressProvider.getNextAddress() which returns an InetSocketAddress.
Specified by:
getNextAddress in interface AddressProvider
Specified by:
getNextAddress in interface SocketAddressProvider
Returns:
the next available address or null if the list of available addresses was exhausted

accept

public void accept()
This method should be called by the client immediately after it determines that it can successfully use an address returned by the SocketAddressProvider.getNextAddress() method.
Specified by:
accept in interface SocketAddressProvider

reject

public 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 SocketAddressProvider.getNextAddress() method has failed.
Specified by:
reject in interface SocketAddressProvider
Parameters:
eCause - (optional) an exception that carries the reason why the the caller rejected the previously returned address

equals

public boolean equals(java.lang.Object o)
SocketAddressProvider instances are considered equivalent iff they consistently produce the same resulting set of addresses.

Note: the general contract of hashCode and equals() should be preserved; AddressProviders that are "equal" should produce the same hashCode.

Specified by:
equals in interface SocketAddressProvider
Parameters:
o - the Object to compare this SocketAddressProvider to for equality
Returns:
true iff this SocketAddressProvider is equal to the specified object

hashCode

public int hashCode()
Return the hash code for this SocketAddressProvider.
Specified by:
hashCode in interface SocketAddressProvider
Returns:
the hash code for this SocketAddressProvider

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.