|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.io.ecwapi.ECWFileCache
public class ECWFileCache
Field Summary | |
---|---|
static long |
EXPIRATION_PERIOD_MS
|
static long |
MAX_NUM_OPEN
|
Constructor Summary | |
---|---|
ECWFileCache()
|
Method Summary | |
---|---|
static com.ermapper.ecw.JNCSFile |
claimAccess(java.lang.String fileName)
Claim access to an ECW file. |
static void |
releaseFile(com.ermapper.ecw.JNCSFile myfile)
Release access to an ECW file. |
static void |
setExpirationPeriod(long MilliSecs)
Set expiration period Set the time in milliseconds that a cache entry remains valid. |
static void |
setMaxNumOpen(long MaxOpen)
Set maximum number of unused file instances This parameter describes the maximum number of UNLOCKED entries in the cache (locked instances are not counted). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static long EXPIRATION_PERIOD_MS
public static long MAX_NUM_OPEN
Constructor Detail |
---|
public ECWFileCache()
Method Detail |
---|
public static com.ermapper.ecw.JNCSFile claimAccess(java.lang.String fileName) throws com.ermapper.ecw.JNCSException
If there is a non-expired instance in the cache, re-uses and locks this. Otherwise adds a new one to the cache.
CAUTION: This cache DOES NOT HANDLE NESTED LOCKS/UNLOCKS ! This means, that after having called claimAcces, you MUST call releaseFile before ANY OTHER OPERATION ON THE CACHE within the same thread.
NOTE: There is no periodical cleanup of this cache. The expiration method is called only during new calls to claimAccess/releaseFile. So server memory consumption may remain high for a much longer time than the defined ExpirationPeriod.
com.ermapper.ecw.JNCSException
public static void releaseFile(com.ermapper.ecw.JNCSFile myfile)
Unlocks the cache entry. Calls also the expiration method for cleanup of the instances that exceed MaxNumOpen.
public static void setExpirationPeriod(long MilliSecs)
Set the time in milliseconds that a cache entry remains valid. Calls also the expiration method for cleanup.
Default value: 600000
public static void setMaxNumOpen(long MaxOpen)
This parameter describes the maximum number of UNLOCKED entries in the cache (locked instances are not counted). Calls also the expiration method for cleanup.
Default value: 10
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org