public class RmiCacheServer extends UnicastRemoteObject implements RemoteableCache, Serializable
LocalCache.refDEFAULT_UNIQUE_MET_KEY| Constructor and Description |
|---|
RmiCacheServer(URL fmUrl,
String rangeQueryElementName,
String rangeStartDateTime,
String rangeEndDateTime,
String uniqueElementName,
List<String> productTypeNames) |
| Modifier and Type | Method and Description |
|---|---|
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. |
String |
getUniqueElementName() |
List<String> |
getUniqueElementProductTypeNames() |
void |
launchServer(int rmiPort) |
void |
launchServer(URL filemgrUrl,
int rmiPort) |
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 |
stopServer(int port) |
void |
sync()
Synchronizes this Cache with the File Manager specified by the
RemoteableCache.setFileManager(URL) method. |
void |
sync(List<String> uniqueElementProductTypeNames)
Synchronizes this Cache with the File Manager specified by the
RemoteableCache.setFileManager(URL) method. |
void |
sync(String uniqueElementName,
List<String> uniqueElementProductTypeNames)
Synchronizes this Cache with the File Manager specified by the
RemoteableCache.setFileManager(URL) method. |
clone, exportObject, exportObject, exportObject, unexportObjectgetClientHost, getLog, setLogpublic RmiCacheServer(URL fmUrl, String rangeQueryElementName, String rangeStartDateTime, String rangeEndDateTime, String uniqueElementName, List<String> productTypeNames) throws RemoteException
RemoteExceptionpublic void launchServer(int rmiPort)
throws RemoteException
RemoteExceptionpublic void launchServer(URL filemgrUrl, int rmiPort) throws RemoteException
RemoteExceptionpublic void stopServer(int port)
throws RemoteException
RemoteExceptionpublic void clear()
throws RemoteException
RemoteableCacheclear in interface RemoteableCacheRemoteExceptionpublic boolean contains(String productName) throws RemoteException
RemoteableCacheProduct with the given
productName exists.contains in interface RemoteableCacheproductName - The name of the Product to check for in the Cache.Product is foudn in the Cache, False,
otherwise.RemoteExceptionpublic void setFileManager(URL fmUrl) throws RemoteException
RemoteableCacheURL to the File Manager to connect this Cache to.setFileManager in interface RemoteableCachefmUrl - The URL of the File Manager to cache Products
from.RemoteExceptionpublic int size()
throws RemoteException
size in interface RemoteableCacheProduct cache.RemoteExceptionpublic void sync(List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCacheRemoteableCache.setFileManager(URL) method.sync in interface RemoteableCacheuniqueElementProductTypeNames - The List ProductTypes to cache
Products from.RemoteException - If there is any error.public void sync(String uniqueElementName, List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCacheRemoteableCache.setFileManager(URL) method.sync in interface RemoteableCacheuniqueElementName - The met key identifier to use for determining Product
existance (if different than "CAS.ProductName").uniqueElementProductTypeNames - The List of ProductTypes to cache
Products from.RemoteException - If there is any error.public void sync()
throws RemoteException
RemoteableCacheRemoteableCache.setFileManager(URL) method. This method also assumes that the
unique element (identified by RemoteableCache.setUniqueElementName(String) and
the List of ProductTypes have also been set appropriate
(e.g., by using RemoteableCache.setUniqueElementProductTypeNames(List).sync in interface RemoteableCacheRemoteException - If any error occurs.public URL getFileManagerUrl() throws RemoteException
RemoteableCacheURL of the File Manager that this Cache communicates
with.getFileManagerUrl in interface RemoteableCacheURL of the File Manager that this Cache communicates
with.RemoteExceptionpublic List<String> getUniqueElementProductTypeNames() throws RemoteException
RemoteExceptionpublic void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCacheProductTypes to cache.setUniqueElementProductTypeNames in interface RemoteableCacheuniqueElementProductTypeNames - the uniqueElementProductTypeNames to setRemoteExceptionpublic String getUniqueElementName() throws RemoteException
RemoteExceptionpublic void setUniqueElementName(String uniqueElementName) throws RemoteException
RemoteableCacheProduct for use in determining whether the Product is in the
Cache.setUniqueElementName in interface RemoteableCacheuniqueElementName - the uniqueElementName to setRemoteExceptionCopyright © 1999–2017 Apache OODT. All rights reserved.