org.apache.oodt.cas.filemgr.ingest
Interface RemoteableCache

All Superinterfaces:
Remote
All Known Implementing Classes:
RmiCacheServer

public interface RemoteableCache
extends Remote

Version:
$Revision: 11462 $

A Java RMI Remote-able implementation of the Cache interface.

.
Author:
mattmann, bfoster

Field Summary
static String DEFAULT_UNIQUE_MET_KEY
           
 
Method Summary
 void clear()
          Clears the current cache.
 boolean contains(String productName)
          Checks the cache to determine if a Product with the given productName exists.
 URL getFileManagerUrl()
          Gets the URL of the File Manager that this Cache communicates with.
 void setFileManager(URL fmUrl)
          Specifies the URL to the File Manager to connect this Cache to.
 void setUniqueElementName(String uniqueElementName)
          Sets the name of the met element to use as the identifier of a Product for use in determining whether the Product is in the Cache.
 void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames)
          Sets the names of the ProductTypes to cache.
 int size()
           
 void sync()
          Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method.
 void sync(List<String> uniqueElementProductTypeNames)
          Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method.
 void sync(String uniqueElementName, List<String> uniqueElementProductTypeNames)
          Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method.
 

Field Detail

DEFAULT_UNIQUE_MET_KEY

static final String DEFAULT_UNIQUE_MET_KEY
See Also:
Constant Field Values
Method Detail

clear

void clear()
           throws RemoteException
Clears the current cache. This should be used before a re-#sync(String, String)) occurs.

Throws:
RemoteException

contains

boolean contains(String productName)
                 throws RemoteException
Checks the cache to determine if a Product with the given productName exists.

Parameters:
productName - The name of the Product to check for in the Cache.
Returns:
True if the Product is foudn in the Cache, False, otherwise.
Throws:
RemoteException

setFileManager

void setFileManager(URL fmUrl)
                    throws RemoteException
Specifies the URL to the File Manager to connect this Cache to.

Parameters:
fmUrl - The URL of the File Manager to cache Products from.
Throws:
RemoteException

size

int size()
         throws RemoteException
Returns:
The size of the current Product cache.
Throws:
RemoteException

sync

void sync(List<String> uniqueElementProductTypeNames)
          throws RemoteException
Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method.

Parameters:
uniqueElementProductTypeNames - The List ProductTypes to cache Products from.
Throws:
RemoteException - If there is any error.

sync

void sync(String uniqueElementName,
          List<String> uniqueElementProductTypeNames)
          throws RemoteException
Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method.

Parameters:
uniqueElementName - The met key identifier to use for determining Product existance (if different than "CAS.ProductName").
uniqueElementProductTypeNames - The List of ProductTypes to cache Products from.
Throws:
RemoteException - If there is any error.

sync

void sync()
          throws RemoteException
Synchronizes this Cache with the File Manager specified by the setFileManager(URL) method. This method also assumes that the unique element (identified by setUniqueElementName(String) and the List of ProductTypes have also been set appropriate (e.g., by using setUniqueElementProductTypeNames(List).

Throws:
RemoteException - If any error occurs.

setUniqueElementProductTypeNames

void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames)
                                      throws RemoteException
Sets the names of the ProductTypes to cache.

Parameters:
uniqueElementProductTypeNames - A List of java.util.String names of ProductTypes.
Throws:
RemoteException

setUniqueElementName

void setUniqueElementName(String uniqueElementName)
                          throws RemoteException
Sets the name of the met element to use as the identifier of a Product for use in determining whether the Product is in the Cache.

Parameters:
uniqueElementName - The name of the met element used to uniquely identify Products.
Throws:
RemoteException

getFileManagerUrl

URL getFileManagerUrl()
                      throws RemoteException
Gets the URL of the File Manager that this Cache communicates with.

Returns:
The URL of the File Manager that this Cache communicates with.
Throws:
RemoteException


Copyright © 1999-2011 Apache OODT. All Rights Reserved.