private class JoinManager.ProxyReg extends Object
Modifier and Type | Class and Description |
---|---|
private class |
JoinManager.ProxyReg.DiscLeaseListener
Class that is registered as a listener with this join manager's
lease renewal manager.
|
Modifier and Type | Field and Description |
---|---|
private JoinManager.ProxyReg.DiscLeaseListener |
dListener
The instance of
DiscLeaseListener that is registered
with the lease renewal manager that handles the lease of this join
manger's service. |
ServiceRegistrar |
proxy
The prepared proxy to the lookup service referenced by
this class, and with which this join manager's service will be
registered.
|
JoinManager.ProxyRegTask |
proxyRegTask
The
ProxyRegTask that instantiated this
ProxyReg . |
Lease |
serviceLease |
ServiceRegistration |
srvcRegistration
The prepared registration proxy returned by this class'
associated lookup service when this join manager registers its
associated service.
|
List |
taskList
The set of sub-tasks that are to be executed in order for the
lookup service associated with the current instance of this class.
|
Constructor and Description |
---|
JoinManager.ProxyReg(ServiceRegistrar proxy)
Constructor that associates this class with the lookup service
referenced in the given
ProxyReg parameter. |
Modifier and Type | Method and Description |
---|---|
void |
addAttributes(Entry[] attSet)
With respect to the lookup service referenced in this class
and with which this join manager's service is registered, this
method associates with that service a new set of attributes -- in
addition to that service's current set of attributes.
|
void |
addTask(JoinManager.JoinTask task)
Convenience method that adds new sub-tasks to this class'
task queue.
|
boolean |
equals(Object obj)
Returns true if the both objects' associated proxies are equal.
|
void |
fail(Throwable e)
Convenience method that encapsulates appropriate behavior when
failure is encountered related to the current instance of this
class.
|
int |
hashCode()
Returns the hash code of the proxy referenced in this class.
|
void |
modifyAttributes(Entry[] templ,
Entry[] attSet)
With respect to the lookup service referenced in this class
and with which this join manager's service is registered, this
method changes that service's current attributes by selecting
the attributes to change using the given first parameter;
and identifying the desired changes to make through the
contents of the second parameter.
|
void |
register(Entry[] srvcAttrs)
Registers the service associated with this join manager with the
the lookup service corresponding to this class.
|
void |
setAttributes(Entry[] attSet)
With respect to the lookup service referenced in this class
and with which this join manager's service is registered, this
method replaces that service's current attributes with a new
set of attributes.
|
public JoinManager.ProxyRegTask proxyRegTask
ProxyRegTask
that instantiated this
ProxyReg
.public ServiceRegistrar proxy
public ServiceRegistration srvcRegistration
public Lease serviceLease
public List taskList
private JoinManager.ProxyReg.DiscLeaseListener dListener
DiscLeaseListener
that is registered
with the lease renewal manager that handles the lease of this join
manger's service.public JoinManager.ProxyReg(ServiceRegistrar proxy)
ProxyReg
parameter.proxy
- data structure that references the lookup service on
which the sub-tasks referenced in this class will be
executed in orderpublic void addTask(JoinManager.JoinTask task)
task
- the task to add to the task queuepublic void register(Entry[] srvcAttrs) throws Exception
ServiceIDListener
has been registered with this join manager, this method will
send to that listener a notification containing the service's ID.Exception
public void addAttributes(Entry[] attSet) throws Exception
Exception
public void modifyAttributes(Entry[] templ, Entry[] attSet) throws Exception
Exception
public void setAttributes(Entry[] attSet) throws Exception
Exception
public void fail(Throwable e)
Throwable
according to the logging levels specified
for this utility.
Note that if the discovery manager employed by this join manager
has been terminated, then the attempt to discard the lookup
service proxy will result in an IllegalStateException
.
Since this method is called only within the tasks run by
this join manager, and since propagating an
IllegalStateException
out into the
ThreadGroup
of those tasks is undesirable, this
method will not propagate the IllegalStateException
that occurs as a result of an attempt to discard a lookup
service proxy from the discovery manager employed by this
join manager.
For more information, refer to Bug 4490355.public boolean equals(Object obj)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.