nenok.net.processor
Interface Processor

All Superinterfaces:
Remote
All Known Implementing Classes:
ProcessorImpl

public interface Processor
extends Remote

The interface of a processor in a Nenok federation.

Version:
$LastChangedRevision: 556 $
$LastChangedDate: 2008-03-26 14:21:45 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Method Summary
 Locator combine(Locator loc, Locator... locs)
          Combines the valuations specified by locators and stores the result.
 void delete(Locator loc)
          Deletes a stored valuation from this processor.
 boolean exists(Uuid envID)
          Is the valuation with the given envelope ID stored on this processor.
 Valuation get(Uuid envID)
          Retrieves a stored valuation from this processor.
 String getCodebase()
           
 Uuid getPID()
           
 Locator inverse(Locator loc)
          Inverses the valuations specified by the locator.
 Locator marginalize(Locator loc, Domain dom)
          Marginalizes the valuations specified by the locator to be given domain.
 void reset()
          Deletes all stored valuations.
 Locator store(Envelope env)
          Stores a valuation wrapped in an envelope on this processor.
 Locator store(Valuation val)
          Stores a valuation on this processor.
 Locator[] store(Valuation[] vals)
          Stores a set of valuations on this processor.
 

Method Detail

store

Locator store(Envelope env)
              throws RemoteException
Stores a valuation wrapped in an envelope on this processor.

Parameters:
env - The envelope with the valuation to store.
Returns:
The locator of the stored valuation (envelope).
Throws:
RemoteException - Locator methods all throw remote exceptions.

store

Locator store(Valuation val)
              throws RemoteException
Stores a valuation on this processor.

Parameters:
val - The valuation to store.
Returns:
The locator of the stored valuation.
Throws:
RemoteException - Locator methods all throw remote exceptions.

store

Locator[] store(Valuation[] vals)
                throws RemoteException
Stores a set of valuations on this processor.

Parameters:
vals - The valuations to store.
Returns:
The locators of the stored valuations. Locator i references valuation i.
Throws:
RemoteException - Locator methods all throw remote exceptions.

get

Valuation get(Uuid envID)
              throws RemoteException
Retrieves a stored valuation from this processor. This method call does not remove the corresponding locator from the internal store.

Parameters:
envID - The identifier of the valuation's envelope.
Returns:
The valuation referenced by the locator or null.
Throws:
RemoteException - Locator methods all throw remote exceptions.

exists

boolean exists(Uuid envID)
               throws RemoteException
Is the valuation with the given envelope ID stored on this processor.

Parameters:
envID - The valuation's envelope ID.
Returns:
true, if the valuation exists.
Throws:
RemoteException - Locator methods all throw remote exceptions.

delete

void delete(Locator loc)
            throws RemoteException
Deletes a stored valuation from this processor.

Parameters:
loc - The locator referencing the valuation to delete.
Throws:
RemoteException - Locator methods all throw remote exceptions.

reset

void reset()
           throws RemoteException
Deletes all stored valuations.

Throws:
RemoteException - Locator methods all throw remote exceptions.

combine

Locator combine(Locator loc,
                Locator... locs)
                throws RemoteException
Combines the valuations specified by locators and stores the result.

Parameters:
loc - A locator object.
locs - Further locators that have to be combined.
Returns:
The locator that points to the combined valuation.
Throws:
RemoteException - Locator methods all throw remote exceptions.

marginalize

Locator marginalize(Locator loc,
                    Domain dom)
                    throws RemoteException
Marginalizes the valuations specified by the locator to be given domain.

Parameters:
loc - The locator pointing to the valuation to be marginalized.
dom - The domain onto which the marginalization is performed.
Returns:
The locator that points to the marginalized valuation.
Throws:
RemoteException - Locator methods all throw remote exceptions.

inverse

Locator inverse(Locator loc)
                throws RemoteException
Inverses the valuations specified by the locator.

Parameters:
loc - The locator pointing to the valuation to be inverted.
Returns:
The locator that points to the inverse valuation.
Throws:
RemoteException - Locator methods all throw remote exceptions.

getPID

Uuid getPID()
            throws RemoteException
Returns:
The identifier of this processor.
Throws:
RemoteException - Locator methods all throw remote exceptions.

getCodebase

String getCodebase()
                   throws RemoteException
Returns:
The codebase of this processor at start time.
Throws:
RemoteException - Locator methods all throw remote exceptions.