com.ontimize.util.gis.client.defaultimplementations.cache
Interface ICacheElement

All Known Implementing Classes:
CacheElement, CacheElementGoogleTiles, CacheElementRasterByteArrays, CacheElementVectorialData, CacheNewElementVectorialData

public interface ICacheElement


Field Summary
static java.lang.String BYTE_ARRAYS
           
static java.lang.String CACHE_ON_DISK
           
static java.lang.String DEBUG_MESSAGES
           
static java.lang.String FOLDER_NAME
           
static java.lang.String IMAGE_FORMAT
           
static java.lang.String MAX_CACHE_SIZE
           
static java.lang.String MAX_EXPIRATION_PERIOD
           
 
Method Summary
 void clearCache()
           
 void deleteData(java.lang.Object deletedKeys)
          Delete the data identified by deletedKeys from the cache
 void deleteDataFromFilters(java.lang.Object appliedFilters)
          Delete the data related to the given filters
 com.vividsolutions.jts.geom.Geometry getIntersectedArea(com.vividsolutions.jts.geom.Envelope interestBoundingBox)
          Gets the area resulting from the intersection of the total cache data area and the interest area.
 java.lang.Object insertData(java.lang.Object insertedValues, java.lang.Object appliedFilters)
          Insert new data to the actual cache element
 boolean isAreaInCache(java.lang.Object appliedFilters)
          Check if the interest area has all its data stored in cache
 java.lang.Object queryData(java.lang.Object appliedFilters)
          Request data that fits with the applied filters
 void setConfigurationParameters(java.lang.Object parameters)
          Set the initial configuration parameters.
 void setDataKeys(java.lang.String[] keys)
          Set the name of the actual data key columns
 void setId(java.lang.Object cacheId)
           
 void updateData(java.lang.Object updatedKeys, java.lang.Object newValues)
          Update the data identified by updatedKeys with the values newValues
 

Field Detail

CACHE_ON_DISK

static final java.lang.String CACHE_ON_DISK
See Also:
Constant Field Values

MAX_CACHE_SIZE

static final java.lang.String MAX_CACHE_SIZE
See Also:
Constant Field Values

MAX_EXPIRATION_PERIOD

static final java.lang.String MAX_EXPIRATION_PERIOD
See Also:
Constant Field Values

IMAGE_FORMAT

static final java.lang.String IMAGE_FORMAT
See Also:
Constant Field Values

FOLDER_NAME

static final java.lang.String FOLDER_NAME
See Also:
Constant Field Values

DEBUG_MESSAGES

static final java.lang.String DEBUG_MESSAGES
See Also:
Constant Field Values

BYTE_ARRAYS

static final java.lang.String BYTE_ARRAYS
See Also:
Constant Field Values
Method Detail

setId

void setId(java.lang.Object cacheId)

isAreaInCache

boolean isAreaInCache(java.lang.Object appliedFilters)
Check if the interest area has all its data stored in cache

Parameters:
appliedFilters - Request filters
Returns:
If area is totally contained in cache -> true.

getIntersectedArea

com.vividsolutions.jts.geom.Geometry getIntersectedArea(com.vividsolutions.jts.geom.Envelope interestBoundingBox)
Gets the area resulting from the intersection of the total cache data area and the interest area.

If the interest area is totally on cache the resulting area will be an empty bounding box.

Parameters:
interestBoundingBox - Interest area bounding box
Returns:
Geometry obtained from the intersection

insertData

java.lang.Object insertData(java.lang.Object insertedValues,
                            java.lang.Object appliedFilters)
                            throws java.lang.Exception
Insert new data to the actual cache element

Parameters:
insertedValues - Values to save in cache
appliedFilters - Filters applied in the request of the data to insert
Returns:
Inserted data with the local cache identifiers added
Throws:
java.lang.Exception

updateData

void updateData(java.lang.Object updatedKeys,
                java.lang.Object newValues)
                throws java.lang.Exception
Update the data identified by updatedKeys with the values newValues

Parameters:
updatedKeys - Indentifiers of the data to update
newValues - Updated values for the given identifiers
Throws:
java.lang.Exception

deleteData

void deleteData(java.lang.Object deletedKeys)
                throws java.lang.Exception
Delete the data identified by deletedKeys from the cache

Parameters:
deletedKeys - Indentifiers of the data to delete
Throws:
java.lang.Exception

deleteDataFromFilters

void deleteDataFromFilters(java.lang.Object appliedFilters)
                           throws java.lang.Exception
Delete the data related to the given filters

Parameters:
appliedFilters - Filters applied on deletion
Throws:
java.lang.Exception

queryData

java.lang.Object queryData(java.lang.Object appliedFilters)
                           throws java.lang.Exception
Request data that fits with the applied filters

Parameters:
appliedFilters - Filters applied on request
Returns:
Requested data
Throws:
java.lang.Exception

setDataKeys

void setDataKeys(java.lang.String[] keys)
Set the name of the actual data key columns

Parameters:
keys - String array of the key columns identifiers

setConfigurationParameters

void setConfigurationParameters(java.lang.Object parameters)
Set the initial configuration parameters. Usually these will be a Hashtable with the
related data provider definition parameters

Parameters:
parameters - Cache class configuration parameters

clearCache

void clearCache()