|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdermi.registry.Registry
This class implements the decentralized object location registry
Nested Class Summary | |
---|---|
protected class |
Registry.NamingCommand
Common superclass for data reception commands. |
static class |
Registry.PastContentImpl
Utility class for past content objects |
protected static class |
Registry.PastContentImplHandle
Utility class for past content object handles |
Constructor Summary | |
---|---|
Registry(rice.p2p.commonapi.IdFactory FACTORY,
rice.pastry.PastryNode pn,
int REPLICATION_FACTOR)
Constructor for the decentralized registry: entry point and local start |
Method Summary | |
---|---|
void |
bind(java.lang.String name,
java.util.Properties ref)
Binds the specified name to a remote object. |
void |
insert(rice.p2p.commonapi.Id id,
java.util.Properties props)
Insert object's metadata into the registry |
void |
insert(rice.p2p.commonapi.Id id,
java.io.Serializable ser)
|
java.util.Collection |
list(java.lang.String root)
Returns the list of objects bound below the specified root |
java.io.Serializable |
lookup(rice.p2p.commonapi.Id id)
Returns a serializable object from the decentralized registry |
ERemote |
lookup(java.lang.String name)
Returns a reference, a stub, for the remote object associated with the specified name (or null if not bound) |
void |
rebind(java.lang.String name,
java.util.Properties ref)
Rebinds the specified name in the registry. |
void |
unbind(java.lang.String name)
Unbinds the specified name from the registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Registry(rice.p2p.commonapi.IdFactory FACTORY, rice.pastry.PastryNode pn, int REPLICATION_FACTOR)
FACTORY
- IdFactory IdFactory used by the StorageManager in PASTpn
- PastryNode PAST needs the Pastry node to build on top ofREPLICATION_FACTOR
- int Replication factor used: object handles will be inserted in at most REPLICATION_FACTOR nodesMethod Detail |
---|
public ERemote lookup(java.lang.String name) throws RemoteException
name
- Name of the remote object in the Registry
RemoteException
- If the connection failspublic java.io.Serializable lookup(rice.p2p.commonapi.Id id) throws RemoteException
id
- Id Object's Id
RemoteException
- If unable to connect to the registrypublic void bind(java.lang.String name, java.util.Properties ref) throws RemoteException
name
- Name of the remote object to be used (should be unique)ref
- Remote object reference to bind
RemoteException
- If the connection with the event service fails.public void insert(rice.p2p.commonapi.Id id, java.util.Properties props)
id
- Id Object's Idprops
- Properties Metadata to be insertedpublic void unbind(java.lang.String name) throws RemoteException
name
- Id of the remote object
dermi.NotBoundException
- - if the Registry does not contains this Id.
dermi.RemoteException
- - if the connection with the event service fails.
RemoteException
public void rebind(java.lang.String name, java.util.Properties ref) throws RemoteException
name
- Id of the remote objectref
- remote object reference to bind
dermi.RemoteException
- - if the connection with the event service fails.
RemoteException
public java.util.Collection list(java.lang.String root) throws RemoteException
root
- Hierarchical root (in the form "p2p://...")
RemoteException
public void insert(rice.p2p.commonapi.Id id, java.io.Serializable ser)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |