Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
02344c7522
1 changed files with 10 additions and 10 deletions
|
@ -32,7 +32,7 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
|
|
||||||
|
|
||||||
public static final String EXT = IndexConstants.SQLITE_EXT;
|
public static final String EXT = IndexConstants.SQLITE_EXT;
|
||||||
private static final Log log = PlatformUtil.getLog(SQLiteTileSource.class);
|
private static final Log LOG = PlatformUtil.getLog(SQLiteTileSource.class);
|
||||||
|
|
||||||
private ITileSource base;
|
private ITileSource base;
|
||||||
private String urlTemplate = null;
|
private String urlTemplate = null;
|
||||||
|
@ -125,9 +125,9 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
}
|
}
|
||||||
return (String) bshInterpreter.eval("getTileUrl("+zoom+","+x+","+y+");");
|
return (String) bshInterpreter.eval("getTileUrl("+zoom+","+x+","+y+");");
|
||||||
} catch (bsh.EvalError e) {
|
} catch (bsh.EvalError e) {
|
||||||
WDebug.log("getUrlToLoad Error"+e.getMessage());
|
LOG.debug("getUrlToLoad Error" + e.getMessage());
|
||||||
AccessibleToast.makeText(ctx, e.getMessage(), Toast.LENGTH_LONG).show();
|
AccessibleToast.makeText(ctx, e.getMessage(), Toast.LENGTH_LONG).show();
|
||||||
log.error(e.getMessage(), e);
|
LOG.error(e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
|
|
||||||
protected SQLiteConnection getDatabase(){
|
protected SQLiteConnection getDatabase(){
|
||||||
if((db == null || db.isClosed()) && file.exists() ){
|
if((db == null || db.isClosed()) && file.exists() ){
|
||||||
WDebug.log("Open "+file.getAbsolutePath());
|
LOG.debug("Open " + file.getAbsolutePath());
|
||||||
try {
|
try {
|
||||||
onlyReadonlyAvailable = false;
|
onlyReadonlyAvailable = false;
|
||||||
db = ctx.getSQLiteAPI().openByAbsolutePath(file.getAbsolutePath(), false);
|
db = ctx.getSQLiteAPI().openByAbsolutePath(file.getAbsolutePath(), false);
|
||||||
|
@ -289,8 +289,8 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (log.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
log.debug("Checking tile existance x = " + x + " y = " + y + " z = " + zoom + " for " + (System.currentTimeMillis() - time)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
LOG.debug("Checking tile existance x = " + x + " y = " + y + " z = " + zoom + " for " + (System.currentTimeMillis() - time)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,8 +328,8 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
if(log.isDebugEnabled()) {
|
if(LOG.isDebugEnabled()) {
|
||||||
log.debug("Load tile " + x + "/" + y + "/" + zoom + " for " + (System.currentTimeMillis() - ts)
|
LOG.debug("Load tile " + x + "/" + y + "/" + zoom + " for " + (System.currentTimeMillis() - ts)
|
||||||
+ " ms ");
|
+ " ms ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -452,7 +452,7 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeDB(){
|
public void closeDB(){
|
||||||
WDebug.log("closeDB");
|
LOG.debug("closeDB");
|
||||||
bshInterpreter = null;
|
bshInterpreter = null;
|
||||||
if(timeSupported)
|
if(timeSupported)
|
||||||
clearOld();
|
clearOld();
|
||||||
|
@ -467,7 +467,7 @@ public class SQLiteTileSource implements ITileSource {
|
||||||
if(db == null || db.isReadOnly()){
|
if(db == null || db.isReadOnly()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WDebug.log("DELETE FROM tiles WHERE time<"+(System.currentTimeMillis()-getExpirationTimeMillis()));
|
LOG.debug("DELETE FROM tiles WHERE time<" + (System.currentTimeMillis() - getExpirationTimeMillis()));
|
||||||
db.execSQL("DELETE FROM tiles WHERE time<"+(System.currentTimeMillis()-getExpirationTimeMillis())); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
db.execSQL("DELETE FROM tiles WHERE time<"+(System.currentTimeMillis()-getExpirationTimeMillis())); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
||||||
db.execSQL("VACUUM"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
db.execSQL("VACUUM"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue