edu.cmu.aura.service.db
Interface DataSink

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Database, DataSinkStub

public interface DataSink
extends java.rmi.Remote

DataSink is implemented by the database to allow "raw" modification of the database.


Method Summary
 void delete(java.lang.String serviceName, java.util.ArrayList keyVal)
          Delete an entry from the service database.
 void insert(java.lang.String serviceName, java.util.ArrayList attribs)
          Insert an entry into the service database.
 void update(java.lang.String serviceName, java.util.ArrayList keyVal, java.util.ArrayList attribs)
          Update an entry's attributes in the service database.
 

Method Detail

update

public void update(java.lang.String serviceName,
                   java.util.ArrayList keyVal,
                   java.util.ArrayList attribs)
            throws ServiceException,
                   java.rmi.RemoteException
Update an entry's attributes in the service database. A new entry will be created if one matching the keyVal is not found.

Parameters:
serviceName - name of the service to update
keyVal - key value of the entry to update
attribs - updated attributes
ServiceException
java.rmi.RemoteException

insert

public void insert(java.lang.String serviceName,
                   java.util.ArrayList attribs)
            throws ServiceException,
                   java.rmi.RemoteException
Insert an entry into the service database. An error will occur if the entry already exists. When no entry exists, this function has the same effect as calling update, but requires one less argument.

Parameters:
serviceName - name of the service to insert into
attribs - updated attributes
ServiceException
java.rmi.RemoteException

delete

public void delete(java.lang.String serviceName,
                   java.util.ArrayList keyVal)
            throws ServiceException,
                   java.rmi.RemoteException
Delete an entry from the service database.

Parameters:
serviceName - name of the service to delete from
keyVal - key value of entry to delete
ServiceException
java.rmi.RemoteException