Make long instead of int and format #5883
This commit is contained in:
parent
9a309eadbe
commit
1bfb6166ae
2 changed files with 8 additions and 8 deletions
|
@ -11,15 +11,12 @@ import java.net.URL;
|
|||
import java.net.URLConnection;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
import java.util.concurrent.BlockingDeque;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
@ -310,4 +307,5 @@ public class MapTileDownloader {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class SQLiteTileSource implements ITileSource {
|
|||
private int maxZoom = 17;
|
||||
private boolean inversiveZoom = true; // BigPlanet
|
||||
private boolean timeSupported = false;
|
||||
private int expirationTimeMillis = -1; // never
|
||||
private long expirationTimeMillis = -1; // never
|
||||
private boolean isEllipsoid = false;
|
||||
private String rule = null;
|
||||
private String referer = null;
|
||||
|
@ -208,7 +208,7 @@ public class SQLiteTileSource implements ITileSource {
|
|||
timeSupported = "yes".equalsIgnoreCase(cursor.getString(timecolumn));
|
||||
} else {
|
||||
timeSupported = hasTimeColumn();
|
||||
addInfoColumn("timecolumn", timeSupported?"yes" : "no");
|
||||
addInfoColumn("timecolumn", timeSupported? "yes" : "no");
|
||||
}
|
||||
int expireminutes = list.indexOf("expireminutes");
|
||||
this.expirationTimeMillis = -1;
|
||||
|
@ -475,9 +475,11 @@ public class SQLiteTileSource implements ITileSource {
|
|||
if(db == null || db.isReadOnly()){
|
||||
return;
|
||||
}
|
||||
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("VACUUM"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
|
||||
String sql = "DELETE FROM tiles WHERE time < "+
|
||||
(System.currentTimeMillis() - getExpirationTimeMillis());
|
||||
LOG.debug(sql);
|
||||
db.execSQL(sql);
|
||||
db.execSQL("VACUUM");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue