public class PersistentCacheTileDataSource extends CacheTileDataSource
swigCMemOwn
Constructor and Description |
---|
PersistentCacheTileDataSource(long cPtr,
boolean cMemoryOwn) |
PersistentCacheTileDataSource(TileDataSource dataSource,
java.lang.String databasePath)
Constructs a PersistentCacheTileDataSource object from tile data source
and a sqlite database. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache.
|
void |
close()
Close the cache database.
|
void |
delete() |
protected void |
finalize() |
long |
getCapacity()
Returns the compressed tile cache capacity.
|
static long |
getCPtr(PersistentCacheTileDataSource obj) |
boolean |
isCacheOnlyMode()
Returns the state of cache only mode.
|
TileData |
loadTile(MapTile mapTile)
Loads the specified tile.
|
void |
setCacheOnlyMode(boolean enabled)
Switches the datasource to 'cache only' mode or switches back from the mode.
If enabled, tiles are loaded from the cache only and the original data source is not used. By default, cache only mode is off. |
void |
setCapacity(long capacity)
Sets the cache capacity.
|
static PersistentCacheTileDataSource |
swigCreatePolymorphicInstance(long cPtr,
boolean cMemoryOwn)
Creates a polymorphic instance of the given native object.
|
protected void |
swigDirectorDisconnect() |
java.lang.String |
swigGetClassName()
Returns the actual class name of this object.
|
java.lang.Object |
swigGetDirectorObject()
Returns the connected director object.
|
void |
swigReleaseOwnership() |
void |
swigTakeOwnership() |
getCPtr, notifyTilesChanged
getCPtr, getMaxZoom, getMinZoom, getProjection
public PersistentCacheTileDataSource(long cPtr, boolean cMemoryOwn)
public PersistentCacheTileDataSource(TileDataSource dataSource, java.lang.String databasePath)
dataSource
- The datasource to be cached.databasePath
- The path to the sqlite database, where the tiles will be cached.public static long getCPtr(PersistentCacheTileDataSource obj)
protected void finalize()
finalize
in class CacheTileDataSource
public void delete()
delete
in class CacheTileDataSource
protected void swigDirectorDisconnect()
swigDirectorDisconnect
in class CacheTileDataSource
public void swigReleaseOwnership()
swigReleaseOwnership
in class CacheTileDataSource
public void swigTakeOwnership()
swigTakeOwnership
in class CacheTileDataSource
public static PersistentCacheTileDataSource swigCreatePolymorphicInstance(long cPtr, boolean cMemoryOwn)
public boolean isCacheOnlyMode()
public void setCacheOnlyMode(boolean enabled)
enabled
- True when the mode should be enabled, false otherwise.public void close()
public TileData loadTile(MapTile mapTile)
TileDataSource
loadTile
in class TileDataSource
mapTile
- The tile to load.public void clear()
CacheTileDataSource
clear
in class CacheTileDataSource
public long getCapacity()
CacheTileDataSource
getCapacity
in class CacheTileDataSource
public void setCapacity(long capacity)
CacheTileDataSource
setCapacity
in class CacheTileDataSource
public java.lang.String swigGetClassName()
swigGetClassName
in class CacheTileDataSource
public java.lang.Object swigGetDirectorObject()
swigGetDirectorObject
in class CacheTileDataSource