|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oodt.cas.filemgr.ingest.LocalCache
public class LocalCache
A cached way to determine product ingestion against a File Manager.
Field Summary |
---|
Fields inherited from interface org.apache.oodt.cas.filemgr.ingest.Cache |
---|
DEFAULT_UNIQUE_MET_KEY |
Constructor Summary | |
---|---|
LocalCache(URL fmUrl,
String uniqueElementName,
List<String> uniqueElementProductTypes,
String rangeQueryElementName,
String startOfQuery,
String endOfQuery)
|
|
LocalCache(URL fmUrl,
String rangeQueryElementName,
String startOfQuery,
String endOfQuery)
|
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. |
String |
getUniqueElementName()
|
List<String> |
getUniqueElementProductTypeNames()
|
boolean |
liveHasProduct(String uniqueElementName,
String uniqueElementValue,
String productTypeName)
Performs a XmlRpcFileManagerClient.hasProduct(String) check
against a live File Manager, bypassing the Cache . |
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 Cache.setFileManager(URL) method. |
void |
sync(List<String> uniqueElementProductTypeNames)
Synchronizes this Cache with the File Manager specified by the Cache.setFileManager(URL) method. |
void |
sync(String uniqueElementName,
List<String> uniqueElementProductTypeNames)
Synchronizes this Cache with the File Manager specified by the Cache.setFileManager(URL) method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalCache(URL fmUrl, String rangeQueryElementName, String startOfQuery, String endOfQuery)
fmUrl
- uniqueElementName
- rangeQueryElementName
- startOfQuery
- endOfQuery
- public LocalCache(URL fmUrl, String uniqueElementName, List<String> uniqueElementProductTypes, String rangeQueryElementName, String startOfQuery, String endOfQuery)
fmUrl
- uniqueElementName
- uniqueElementProductType
- rangeQueryElementName
- startOfQuery
- endOfQuery
- Method Detail |
---|
public void sync(List<String> uniqueElementProductTypeNames) throws CacheException
Cache
Cache.setFileManager(URL)
method.
sync
in interface Cache
uniqueElementProductTypeNames
- The List
ProductType
s to cache
Product
s from.
CacheException
- If there is any error.public void sync(String uniqueElementName, List<String> uniqueElementProductTypeNames) throws CacheException
Cache
Cache.setFileManager(URL)
method.
sync
in interface Cache
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.public void clear()
Cache
#sync(String, String))
occurs.
clear
in interface Cache
public int size()
size
in interface Cache
Product
cache.public boolean contains(String productName)
Cache
Product
with the given
productName
exists.
contains
in interface Cache
productName
- The name of the Product
to check for in the Cache.
Product
is foudn in the Cache, False,
otherwise.public void setFileManager(URL fmUrl)
Cache
URL
to the File Manager to connect this Cache to.
setFileManager
in interface Cache
fmUrl
- The URL
of the File Manager to cache Product
s
from.public void sync() throws CacheException
Cache
Cache.setFileManager(URL)
method. This method also assumes that the
unique element (identified by Cache.setUniqueElementName(String)
and
the List
of ProductType
s have also been set appropriate
(e.g., by using Cache.setUniqueElementProductTypeNames(List)
.
sync
in interface Cache
CacheException
- If any error occurs.public URL getFileManagerUrl()
Cache
URL
of the File Manager that this Cache communicates
with.
getFileManagerUrl
in interface Cache
URL
of the File Manager that this Cache communicates
with.public boolean liveHasProduct(String uniqueElementName, String uniqueElementValue, String productTypeName) throws CacheException
XmlRpcFileManagerClient.hasProduct(String)
check
against a live File Manager, bypassing the Cache
.
uniqueElementName
- The product identifier element to identify whether the product
was received yet.uniqueElementValue
- The value of the product identifier element.productTypeName
- The ProductType
of the Product that you would like to
check existence for.
uniqueElement
) exists, False otherwise.
CacheException
- If any error occurs.public String getUniqueElementName()
public void setUniqueElementName(String uniqueElementName)
Cache
Product
for use in determining whether the Product is in the
Cache.
setUniqueElementName
in interface Cache
uniqueElementName
- the uniqueElementName to setpublic List<String> getUniqueElementProductTypeNames()
public void setUniqueElementProductTypeNames(List<String> uniqueElementProductTypeNames)
Cache
ProductType
s to cache.
setUniqueElementProductTypeNames
in interface Cache
uniqueElementProductTypeNames
- the uniqueElementProductTypeNames to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |