nenok.net
Class Locator
java.lang.Object
nenok.net.Locator
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- DefaultLocator, IdentityLocator
public abstract class Locator
- extends Object
- implements Serializable
The location of a (remote) Valuation
object can unambiguously be determined by
the identifier of the processor hosting the valuation and the identifier of the valuation's
envelope. Locators are objects that carries these informations in order to localize valuation
objects at a later time. Furthermore, they manage the following additional informations:
- The domain of the referenced valuation. Jointree construction algorithms need to know
the domains of the valuations to build jointrees without transmitting valuation objects
over the network.
- The weight of the referenced valuation. It is used as the principal measure for the processor
allocation process and needs therefore to be avaiable at this time.
- Locator objects are collected within knowledgebases. Such knowledgebases should only contain
valuations of the same type. Because only references to valuations are stored in knowledgebases,
this cannot be garantueed at compile-time. Each locator contains therefore the package and classname
(i.e.
v.getClass().getName()
) for the valuation object it references. Using this information,
knowledgebases can identify the valuation types.
- Version:
- 1.3
- Author:
- Marc Pouly
- See Also:
- Serialized Form
Constructor Summary |
protected |
Locator(net.jini.id.Uuid pid)
Constructor: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Locator
protected Locator(net.jini.id.Uuid pid)
- Constructor:
- Parameters:
pid
- The identifier of the processor hosting the valuation.
retrieve
public abstract Valuation retrieve()
throws RemoteException
- Returns:
- Retrieves the referenced valuation from the processor.
- Throws:
RemoteException
- Exception caused when trying to access processors.
delete
public abstract void delete()
throws RemoteException
- Deletes the valuation that is referenced by this locator.
- Throws:
RemoteException
- Exception caused when trying to access processors.
getDomain
public abstract Domain getDomain()
- Returns:
- The domain of the referenced valuation.
getWeight
public abstract int getWeight()
- Returns:
- The weight of the referenced valuation.
getType
public abstract String getType()
- Returns:
- The type (class name) of the referenced valuation.
getPID
public net.jini.id.Uuid getPID()
- Returns:
- The indentifier of the processor that hosts the valuation.