Package com.tangosol.net
Class URLMemberIdentityProvider
- java.lang.Object
-
- com.tangosol.net.URLMemberIdentityProvider
-
- All Implemented Interfaces:
MemberIdentityProvider
public class URLMemberIdentityProvider extends Object implements MemberIdentityProvider
AMemberIdentityProviderthat retrieves identity values from URLs, files, or class path resources.- Since:
- 22.06
- Author:
- Jonathan Knight
-
-
Field Summary
Fields Modifier and Type Field Description static com.oracle.coherence.common.util.DurationDURATION_HTTP_TIMEOUTThe default http connection timeout.static com.oracle.coherence.common.util.DurationDURATION_RETRY_PERIODThe default retry period.static com.oracle.coherence.common.util.DurationDURATION_RETRY_TIMEOUTThe default retry timeout.protected HttpClientm_clientThe http client used to access http or https URLs.protected ClusterDependenciesm_dependenciesThe cluster dependencies.static StringPROP_HTTP_TIMEOUTThe system property to use to set the http connection timeout.static StringPROP_MACHINEThe system property to use to set the URL to read the machine name from.static StringPROP_MEMBERThe system property to use to set the URL to read the member name from.static StringPROP_RACKThe system property to use to set the URL to read the rack name from.static StringPROP_RETRY_PERIODThe system property to use to set the retry period.static StringPROP_RETRY_TIMEOUTThe system property to use to set the retry timeout.static StringPROP_ROLEThe system property to use to set the URL to read the role name from.static StringPROP_SITEThe system property to use to set the URL to read the site name from.static StringPROP_SOCKET_PROVIDERThe system property to use to set the URL to read the role name from.-
Fields inherited from interface com.tangosol.net.MemberIdentityProvider
PROPERTY
-
-
Constructor Summary
Constructors Constructor Description URLMemberIdentityProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdoHttpRequest(URI uri)protected HttpClientensureClient()StringgetMachineName()Return the name for the Machine (such as a host name) in which this Member resides.StringgetMemberName()Return the name for the Member.StringgetRackName()Return the name for the Rack (such as a physical rack, cage or blade frame) in which this Member resides.StringgetRoleName()Return the role name for the Member.StringgetSiteName()Return the name for the Site (such as a data center) in which this Member resides.voidsetDependencies(ClusterDependencies deps)Set the cluster dependencies.
-
-
-
Field Detail
-
PROP_MACHINE
public static final String PROP_MACHINE
The system property to use to set the URL to read the machine name from.- See Also:
- Constant Field Values
-
PROP_MEMBER
public static final String PROP_MEMBER
The system property to use to set the URL to read the member name from.- See Also:
- Constant Field Values
-
PROP_SITE
public static final String PROP_SITE
The system property to use to set the URL to read the site name from.- See Also:
- Constant Field Values
-
PROP_RACK
public static final String PROP_RACK
The system property to use to set the URL to read the rack name from.- See Also:
- Constant Field Values
-
PROP_ROLE
public static final String PROP_ROLE
The system property to use to set the URL to read the role name from.- See Also:
- Constant Field Values
-
PROP_SOCKET_PROVIDER
public static final String PROP_SOCKET_PROVIDER
The system property to use to set the URL to read the role name from.- See Also:
- Constant Field Values
-
PROP_RETRY_PERIOD
public static final String PROP_RETRY_PERIOD
The system property to use to set the retry period.- See Also:
- Constant Field Values
-
DURATION_RETRY_PERIOD
public static final com.oracle.coherence.common.util.Duration DURATION_RETRY_PERIOD
The default retry period.
-
PROP_RETRY_TIMEOUT
public static final String PROP_RETRY_TIMEOUT
The system property to use to set the retry timeout.- See Also:
- Constant Field Values
-
DURATION_RETRY_TIMEOUT
public static final com.oracle.coherence.common.util.Duration DURATION_RETRY_TIMEOUT
The default retry timeout.
-
PROP_HTTP_TIMEOUT
public static final String PROP_HTTP_TIMEOUT
The system property to use to set the http connection timeout.- See Also:
- Constant Field Values
-
DURATION_HTTP_TIMEOUT
public static final com.oracle.coherence.common.util.Duration DURATION_HTTP_TIMEOUT
The default http connection timeout.
-
m_dependencies
protected ClusterDependencies m_dependencies
The cluster dependencies.
-
m_client
protected volatile HttpClient m_client
The http client used to access http or https URLs.
-
-
Method Detail
-
getMachineName
public String getMachineName()
Description copied from interface:MemberIdentityProviderReturn the name for the Machine (such as a host name) in which this Member resides. This name is used for logging purposes and to differentiate among multiple servers, and may be used as the basis for determining the MachineId property.- Specified by:
getMachineNamein interfaceMemberIdentityProvider- Returns:
- the configured Machine name or
null
-
getMemberName
public String getMemberName()
Description copied from interface:MemberIdentityProviderReturn the name for the Member. This name is used for logging purposes and to differentiate among Members running within a particular process.- Specified by:
getMemberNamein interfaceMemberIdentityProvider- Returns:
- the configured Member name or
null
-
getRackName
public String getRackName()
Description copied from interface:MemberIdentityProviderReturn the name for the Rack (such as a physical rack, cage or blade frame) in which this Member resides. This name is used for logging purposes and to differentiate among multiple racks within a particular data center, for example.- Specified by:
getRackNamein interfaceMemberIdentityProvider- Returns:
- the configured Rack name or
null
-
getRoleName
public String getRoleName()
Description copied from interface:MemberIdentityProviderReturn the role name for the Member. This role is completely definable by the application, and can be used to determine what Members to use for specific purposes.- Specified by:
getRoleNamein interfaceMemberIdentityProvider- Returns:
- the configured role name for the Member or
null
-
getSiteName
public String getSiteName()
Description copied from interface:MemberIdentityProviderReturn the name for the Site (such as a data center) in which this Member resides. This name is used for logging purposes and to differentiate among multiple geographic sites.- Specified by:
getSiteNamein interfaceMemberIdentityProvider- Returns:
- the configured Site name or
null
-
setDependencies
public void setDependencies(ClusterDependencies deps)
Description copied from interface:MemberIdentityProviderSet the cluster dependencies.- Specified by:
setDependenciesin interfaceMemberIdentityProvider- Parameters:
deps- the cluster dependencies
-
doHttpRequest
protected String doHttpRequest(URI uri) throws IOException
- Throws:
IOException
-
ensureClient
protected HttpClient ensureClient()
-
-