cbr.service
Interface PicsIndex

All Known Implementing Classes:
PictureCentral

public interface PicsIndex

This interface provides access to the service that manages indexes of pictures. Methods defined in this interface are supposed to allow insertion of new picture entries into an existing index of picture entries.

Entries in the index that have the same URL and picture name as a given entry should be replaced by the given one by any implementing service. Implementing classes need to synchronize with services that perform searches on the index in order to prevent inconsistencies.

A good strategy is to create a service that implements both PicsFinder and PicsIndex. This service should be wrapped into two additional services serving as proxys. One proxy should implement PicsFinder and the other one should implement PicsIndex. The proxys then may be registered on the appropriate service levels such that only privileged agents can access the PicsIndex while any search agent can access the PicsFinder.

Version:
"$Id: PicsIndex.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth

Method Summary
 void delete(Iterator entries)
          Deletes the given picture entries from the picture index.
 void put(Iterator entries)
          Inserts the given picture entries into the existing index.
 

Method Detail

put

public void put(Iterator entries)
         throws IOException
Inserts the given picture entries into the existing index. The distance value is ignored but all other fields should be provided.

Implementations should implement an atomic transaction for updating the index file. If an IOException is thrown then the general contract is that the index file remains unmodified.

Parameters:
entries - The iterator that iterates over the picture entries that shall be inserted into the index.
Throws:
IOException

delete

public void delete(Iterator entries)
            throws IOException
Deletes the given picture entries from the picture index. Only the name and URL fields of the pictures to be removed need to be present in the entries. Implementations should implement an atomic transaction for updating the index file. If an IOException is thrown then the general contract is that the index file remains unmodified.

Parameters:
entries - The iterator that iterates over the picture entries that shall be deleted from the index.
Throws:
IOException


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.