public class RmiCacheServer extends UnicastRemoteObject implements RemoteableCache, Serializable
LocalCache
.ref
DEFAULT_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
ProductType s 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, unexportObject
getClientHost, getLog, setLog
public RmiCacheServer(URL fmUrl, String rangeQueryElementName, String rangeStartDateTime, String rangeEndDateTime, String uniqueElementName, List<String> productTypeNames) throws RemoteException
RemoteException
public void launchServer(int rmiPort) throws RemoteException
RemoteException
public void launchServer(URL filemgrUrl, int rmiPort) throws RemoteException
RemoteException
public void stopServer(int port) throws RemoteException
RemoteException
public void clear() throws RemoteException
RemoteableCache
clear
in interface RemoteableCache
RemoteException
public boolean contains(String productName) throws RemoteException
RemoteableCache
Product
with the given
productName
exists.contains
in interface RemoteableCache
productName
- The name of the Product
to check for in the Cache.Product
is foudn in the Cache, False,
otherwise.RemoteException
public void setFileManager(URL fmUrl) throws RemoteException
RemoteableCache
URL
to the File Manager to connect this Cache to.setFileManager
in interface RemoteableCache
fmUrl
- The URL
of the File Manager to cache Product
s
from.RemoteException
public int size() throws RemoteException
size
in interface RemoteableCache
Product
cache.RemoteException
public void sync(List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCache
RemoteableCache.setFileManager(URL)
method.sync
in interface RemoteableCache
uniqueElementProductTypeNames
- The List
ProductType
s to cache
Product
s from.RemoteException
- If there is any error.public void sync(String uniqueElementName, List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCache
RemoteableCache.setFileManager(URL)
method.sync
in interface RemoteableCache
uniqueElementName
- The met key identifier to use for determining Product
existance (if different than "CAS.ProductName").uniqueElementProductTypeNames
- The List
of ProductType
s to cache
Product
s from.RemoteException
- If there is any error.public void sync() throws RemoteException
RemoteableCache
RemoteableCache.setFileManager(URL)
method. This method also assumes that the
unique element (identified by RemoteableCache.setUniqueElementName(String)
and
the List
of ProductType
s have also been set appropriate
(e.g., by using RemoteableCache.setUniqueElementProductTypeNames(List)
.sync
in interface RemoteableCache
RemoteException
- If any error occurs.public URL getFileManagerUrl() throws RemoteException
RemoteableCache
URL
of the File Manager that this Cache communicates
with.getFileManagerUrl
in interface RemoteableCache
URL
of the File Manager that this Cache communicates
with.RemoteException
public List<String> getUniqueElementProductTypeNames() throws RemoteException
RemoteException
public void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames) throws RemoteException
RemoteableCache
ProductType
s to cache.setUniqueElementProductTypeNames
in interface RemoteableCache
uniqueElementProductTypeNames
- the uniqueElementProductTypeNames to setRemoteException
public String getUniqueElementName() throws RemoteException
RemoteException
public void setUniqueElementName(String uniqueElementName) throws RemoteException
RemoteableCache
Product
for use in determining whether the Product is in the
Cache.setUniqueElementName
in interface RemoteableCache
uniqueElementName
- the uniqueElementName to setRemoteException
Copyright © 1999–2017 Apache OODT. All rights reserved.