|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjgroup.relacs.registry.RegistryImpl
public final class RegistryImpl
This class implements the DependableRegistry interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jgroup.core.registry.DependableRegistry |
|---|
DependableRegistry.RegistryEntry |
| Nested classes/interfaces inherited from interface jgroup.core.MembershipListener |
|---|
MembershipListener.AllowDuplicateViews |
| Field Summary |
|---|
| Fields inherited from interface jgroup.core.registry.DependableRegistry |
|---|
DEPENDABLE_REGISTRY_NAME |
| Constructor Summary | |
|---|---|
RegistryImpl()
Creates and exports a dependable registry replica on the local host that listen to incoming requests on an anonymous communication port. |
|
RegistryImpl(GroupManager gm)
Special constructor for creating the dependable registry as part of another group (e.g., the replication manager group). |
|
RegistryImpl(GroupManager gm,
java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
Creates and exports a dependable registry replica on the local host that listen to incoming requests on the port specified within the configuration object. |
|
RegistryImpl(java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
Creates and exports a dependable registry replica on the local host that listen to incoming requests on the port specified within the configuration object. |
|
| Method Summary | |
|---|---|
IID |
bind(java.lang.String service,
DependableRegistry.RegistryEntry entry,
java.lang.Class serverClass)
Add a replicated member object to the remote object group associated with the specified name in the registry. |
IID |
bind(java.lang.String service,
DependableRegistry.RegistryEntry entry,
java.lang.Class serverClass,
long leaseTime)
Add a replicated member object to the remote object group associated with the specified name in the registry. |
java.lang.Object |
getState(MemberId[] dests)
Method getState is invoked when the member has been
selected as coordinator for the reconciliation protocol. |
void |
hasLeft()
Upcall that is invoked by Jgroup to acknowledge the fact that this object has left the group. |
java.lang.String[] |
list()
Returns an array containing the remote object group names registered in the registry. |
java.rmi.Remote |
lookup(java.lang.String serviceName)
Returns a proxy for the remote object group associated with the specified name in the registry. |
static void |
main(java.lang.String[] argv)
Main method of the class |
void |
prepareChange()
Upcall that is invoked by the group membership service to notify that the current view is not valid any more, and the group membership service is trying to reach an agreement on a new view. |
void |
putState(java.lang.Object obj,
MemberId[] sources)
Method putState is invoked to inform the member about
the state of other members belonging to different partitions. |
void |
refresh(IID iid)
Update the timestamp (lease time) for the server associated with the given binding identifier ( IID). |
void |
shutdown()
|
void |
unbind(IID iid)
Remove a replicated remote object identified by the IID
object obtained when the replica has been registered. |
void |
viewChange(View view)
Upcall invoked on members implementing the MembershipListener
interface, when a view change occurs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistryImpl()
throws java.rmi.RemoteException,
JgroupException,
ConfigurationException
java.rmi.RemoteException - If the registry could not be exported
JgroupException - Generic exception raised by Jgroup
ConfigurationException - Raised when the distributed system configuration object contains an error
public RegistryImpl(GroupManager gm)
throws java.rmi.RemoteException,
JgroupException,
ConfigurationException
java.rmi.RemoteException - If the registry could not be exported
JgroupException - Generic exception raised by Jgroup
ConfigurationException - Raised when the distributed system configuration object contains an error
public RegistryImpl(java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
throws java.rmi.RemoteException,
JgroupException,
ConfigurationException
ServerSocket created from the supplied
RMIServerSocketFactory. A client
that receives a reference to this registry will use a
Socket created from the supplied
RMIClientSocketFactory.
csf - Client-side Socket factory used to make
connections to the registryssf - Server-side ServerSocket factory used to
accept connections to the registry
java.rmi.RemoteException - If the registry could not be exported
JgroupException - Generic exception raised by Jgroup
ConfigurationException - Raised when the distributed system configuration object contains an error
public RegistryImpl(GroupManager gm,
java.rmi.server.RMIClientSocketFactory csf,
java.rmi.server.RMIServerSocketFactory ssf)
throws java.rmi.RemoteException,
JgroupException,
ConfigurationException
ServerSocket created from the supplied
RMIServerSocketFactory. A client
that receives a reference to this registry will use a
Socket created from the supplied
RMIClientSocketFactory.
csf - Client-side Socket factory used to make
connections to the registryssf - Server-side ServerSocket factory used to
accept connections to the registry
java.rmi.RemoteException - If the registry could not be exported
JgroupException - Generic exception raised by Jgroup
ConfigurationException - Raised when the distributed system configuration object contains an error| Method Detail |
|---|
public static void main(java.lang.String[] argv)
@Multicast
public IID bind(java.lang.String service,
DependableRegistry.RegistryEntry entry,
java.lang.Class serverClass)
throws java.rmi.RemoteException,
java.rmi.AccessException
DependableRegistry
bind in interface DependableRegistryservice - The name associated with the remote object groupentry - The RegistryEntry type associated with the member object implementationserverClass - The class object of the member object implementation
IID identifier that can be used to remove a
replicated remote object from the binding set.
java.rmi.RemoteException - Raised when remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
@Multicast
public IID bind(java.lang.String service,
DependableRegistry.RegistryEntry entry,
java.lang.Class serverClass,
long leaseTime)
throws java.rmi.RemoteException,
java.rmi.AccessException
DependableRegistry
bind in interface DependableRegistryservice - The name associated with the remote object groupentry - The RegistryEntry type associated with the member object implementationserverClass - The class object of the member object implementationleaseTime - The lease time for the service
IID identifier that can be used to remove a
replicated remote object from the binding set.
java.rmi.RemoteException - Raised when remote operation failed.
java.rmi.AccessException - Raised when this operation is not permitted.
@Multicast
public void unbind(IID iid)
throws java.rmi.RemoteException,
java.rmi.NotBoundException,
java.rmi.AccessException
DependableRegistryIID
object obtained when the replica has been registered.
unbind in interface DependableRegistryiid - the binding identifier obtained when the replica has
been registered
java.rmi.RemoteException - If remote operation failed.
java.rmi.AccessException - If this operation is not permitted.
java.rmi.NotBoundException - if there is no object with this name in the
registry.
@Anycast
public java.lang.String[] list()
throws java.rmi.RemoteException
LookupRegistry
list in interface LookupRegistryjava.rmi.RemoteException - If remote operation failed.
java.rmi.AccessException - If this operation is not permitted.
@Anycast
public java.rmi.Remote lookup(java.lang.String serviceName)
throws java.rmi.RemoteException,
java.rmi.NotBoundException
LookupRegistry
lookup in interface LookupRegistryserviceName - the name associated with the remote object group
java.rmi.RemoteException - If remote operation failed.
java.rmi.AccessException - If this operation is not permitted.
java.rmi.NotBoundException - if there is no object group with this name in the
registry.
@Multicast
public void refresh(IID iid)
throws java.rmi.RemoteException,
java.rmi.AccessException,
java.rmi.NotBoundException
DependableRegistryIID). This method is used by the server-side
LeaseLayer and is invoked through the RegistryLayer.
refresh in interface DependableRegistryiid - The iid of the server whose lease to refresh.
java.rmi.RemoteException - If remote operation failed.
java.rmi.AccessException - If this operation is not permitted.
java.rmi.NotBoundException - if there is no object in the registry matching
the given IID.public void viewChange(View view)
MembershipListenerMembershipListener
interface, when a view change occurs.
viewChange in interface MembershipListenerview - The new view that has been installed.MembershipServicepublic void hasLeft()
MembershipListenerleave method has been invoked on the group membership
service.
hasLeft in interface MembershipListenerMembershipServicepublic void prepareChange()
MembershipListener
prepareChange in interface MembershipListenerMembershipServicepublic void shutdown()
public java.lang.Object getState(MemberId[] dests)
MergingListenergetState is invoked when the member has been
selected as coordinator for the reconciliation protocol.
getState in interface MergingListenerdests - The destination set of the reconciliation message;
public void putState(java.lang.Object obj,
MemberId[] sources)
MergingListenerputState is invoked to inform the member about
the state of other members belonging to different partitions.
putState in interface MergingListenerobj - The reconciliation messagesources - The state contained in status is already known by
members in sources.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||