|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
The core interface for a cache of Product
s (identified by a
particular uniqueElement
) from a File Manager.
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 ProductType s 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 |
---|
static final String DEFAULT_UNIQUE_MET_KEY
Method Detail |
---|
void clear()
#sync(String, String))
occurs.
boolean contains(String productName)
Product
with the given
productName
exists.
productName
- The name of the Product
to check for in the Cache.
Product
is foudn in the Cache, False,
otherwise.void setFileManager(URL fmUrl)
URL
to the File Manager to connect this Cache to.
fmUrl
- The URL
of the File Manager to cache Product
s
from.int size()
Product
cache.void sync(List<String> uniqueElementProductTypeNames) throws CacheException
setFileManager(URL)
method.
uniqueElementProductTypeNames
- The List
ProductType
s to cache
Product
s from.
CacheException
- If there is any error.void sync(String uniqueElementName, List<String> uniqueElementProductTypeNames) throws CacheException
setFileManager(URL)
method.
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.
CacheException
- If there is any error.void sync() throws CacheException
setFileManager(URL)
method. This method also assumes that the
unique element (identified by setUniqueElementName(String)
and
the List
of ProductType
s have also been set appropriate
(e.g., by using setUniqueElementProductTypeNames(List)
.
CacheException
- If any error occurs.void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames)
ProductType
s to cache.
uniqueElementProductTypeNames
- A List
of java.util.String names of
ProductType
s.void setUniqueElementName(String uniqueElementName)
Product
for use in determining whether the Product is in the
Cache.
uniqueElementName
- The name of the met element used to uniquely identify
Product
s.URL getFileManagerUrl()
URL
of the File Manager that this Cache communicates
with.
URL
of the File Manager that this Cache communicates
with.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |