Public Member Functions | |
LSDDbStorage () | |
LSDDbStorage (long lid, long sid, long size, long fda) | |
void | assign (long lid, long sid, long size, long fda, int hasdel) |
boolean | get (ResultSet resultSet) |
boolean | get (LSDDbAdmin admin, long lid, long sid) |
boolean | getForUpdateAdd (LSDDbAdmin admin, long lid, long sid, long filesize, int hasdel) |
boolean | setAdd (LSDDbAdmin admin, long filesize) |
boolean | setAddNoCommit (LSDDbAdmin admin, long filesize) |
boolean | insertNoCommit (LSDDbAdmin admin, long filesize) |
boolean | update (LSDDbAdmin admin, long size, long fdanew, int hasdel) |
boolean | updateNoCommit (LSDDbAdmin admin, long size, long fdanew, int hasdel) |
String | toString () |
Static Public Member Functions | |
static String | getWhereCondPls () |
static String | getWhereCondPl (String id) |
static String | getWhereCond (String id, String slid) |
static LSDDbPreparedStatement | setPGet (LSDDbAdmin admin, long lid) |
static boolean | setAddSizeNoCommit (LSDDbAdmin admin, long lid, long sid, long did, long filesize) |
static LSDLinkedLongList < LSDDbStorage > | getStorages (LSDDbAdmin admin, long lid) |
static boolean | del (LSDDbAdmin admin, long lid, long sid) |
static boolean | delIfEmpty (LSDDbAdmin admin, long lid, long sid) |
static int | delStoragesIfEmpty (LSDDbAdmin admin, long lid) |
static void | checkStorageMT (LSDDbAdmin admin, LSDDbLegacy legacy, boolean repair) |
static void | purgeStorageMT (LSDDbAdmin admin, LSDDbLegacy legacy, boolean repair, int nbthread) |
static boolean | alterIndex (LSDDbAdmin admin) |
Public Attributes | |
long | lid = LSDConstants.invalide_idx |
long | sid = LSDConstants.invalide_idx |
long | size = 0 |
long | fda = LSDConstants.invalide_idx |
int | hasdel = 0 |
Static Public Attributes | |
static final String | table = " lsdstorage " |
static final String[] | fields |
static final int | rlid = 0 |
static final int | rsid = 1 |
static final int | rsize = 2 |
static final int | rfda = 3 |
static final int | rhasdel = 4 |
static final String | allfields |
static final String | index |
Static Private Member Functions | |
static String | getFieldsSetPsplussfh () |
static String | getFieldsValuesPlssf_h (long lid, long sid, long filesize, long fda) |
static LSDDbPreparedStatement | setPGet (LSDDbAdmin admin, long lid, long sid) |
static LSDDbPreparedStatement | setPGetForUpdate (LSDDbAdmin admin, long lid, long sid) |
static LSDDbPreparedStatement | setPUpdateAdd (LSDDbAdmin admin, long lid, long sid, long filesize, long fda, int hasdel) |
static int | setPInsert (LSDDbAdmin admin, long lid, long sid, long filesize, long fda) |
static LSDDbPreparedStatement | setPUpdateSet (LSDDbAdmin admin, long lid, long sid, long filesize, long fda, int hasdel) |
static LSDDbPreparedStatement | getMaxIdxDocument (LSDDbAdmin admin) |
static LSDDbPreparedStatement | getHasDelDocument (LSDDbAdmin admin) |
static LSDDbPreparedStatement | getSizeDocument (LSDDbAdmin admin) |
static void | checkOneStorage (LSDDbAdmin admin, LSDDbStorage storage, LSDDbPreparedStatement prepstmt1, LSDDbPreparedStatement prepstmt2, LSDDbPreparedStatement prepstmt3, LSDDbLegacy legacy, FutureTask< Long >[]tasks, ExecutorService executorService, boolean repair) |
static LSDDbPreparedStatement | getMaxValidFromStorage (LSDDbAdmin admin) |
static LSDDbPreparedStatement | deleteInvalidFromStorage (LSDDbAdmin admin) |
static FutureTask< Long > | purgeOneStorage (LSDDbAdmin admin, LSDDbStorage storage, LSDDbLegacy legacy, ExecutorService executorService, boolean repair) |
Static Private Attributes | |
static final String | insertfields |
openlsd.database.data.LSDDbStorage.LSDDbStorage | ( | ) |
Create an empty Storage
openlsd.database.data.LSDDbStorage.LSDDbStorage | ( | long | lid, | |
long | sid, | |||
long | size, | |||
long | fda | |||
) |
Create a Storage from args
lid | ||
sid | ||
size | ||
fda |
void openlsd.database.data.LSDDbStorage.assign | ( | long | lid, | |
long | sid, | |||
long | size, | |||
long | fda, | |||
int | hasdel | |||
) |
Assign values to object
lid | ||
sid | ||
size | ||
fda | ||
hasdel |
boolean openlsd.database.data.LSDDbStorage.get | ( | ResultSet | resultSet | ) |
Get Values from ResultSet
resultSet |
static String openlsd.database.data.LSDDbStorage.getFieldsSetPsplussfh | ( | ) | [static, private] |
Get String for Setting as Set
static String openlsd.database.data.LSDDbStorage.getFieldsValuesPlssf_h | ( | long | lid, | |
long | sid, | |||
long | filesize, | |||
long | fda | |||
) | [static, private] |
Get String for Setting as Values (INSERT)
lid | ||
sid | ||
filesize | ||
fda |
static String openlsd.database.data.LSDDbStorage.getWhereCondPls | ( | ) | [static] |
Get String for Where Condition
static String openlsd.database.data.LSDDbStorage.getWhereCondPl | ( | String | id | ) | [static] |
Get String for Where Condition
id |
static String openlsd.database.data.LSDDbStorage.getWhereCond | ( | String | id, | |
String | slid | |||
) | [static] |
Get String for Where Condition
id | ||
slid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.setPGet | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) | [static, private] |
Create the PreparedStatement for Get
admin | ||
lid | ||
sid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.setPGet | ( | LSDDbAdmin | admin, | |
long | lid | |||
) | [static] |
Create the PreparedStatement for Get
admin | ||
lid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.setPGetForUpdate | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) | [static, private] |
Create the PreparedStatement for Get for Update
admin | ||
lid | ||
sid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.setPUpdateAdd | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | filesize, | |||
long | fda, | |||
int | hasdel | |||
) | [static, private] |
Create the PreparedStatement for Update
admin | ||
lid | ||
sid | ||
filesize | ||
fda | ||
hasdel |
static int openlsd.database.data.LSDDbStorage.setPInsert | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | filesize, | |||
long | fda | |||
) | [static, private] |
Create the PreparedStatement for Insert
admin | ||
lid | ||
sid | ||
filesize | ||
fda |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.setPUpdateSet | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | filesize, | |||
long | fda, | |||
int | hasdel | |||
) | [static, private] |
Create the PreparedStatement for Update
admin | ||
lid | ||
sid | ||
filesize | ||
fda | ||
hasdel |
boolean openlsd.database.data.LSDDbStorage.get | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) |
Get the Storage object from DB
admin | ||
lid | ||
sid |
boolean openlsd.database.data.LSDDbStorage.getForUpdateAdd | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | filesize, | |||
int | hasdel | |||
) |
Get for update the Storage object (lid, sid) from DB (the parameter filesize is added to the existing Storage size)
This version is correct since fda is not changed. CheckStorage has an internal function to correct this fda.
admin | ||
lid | ||
sid | ||
filesize | ||
hasdel |
boolean openlsd.database.data.LSDDbStorage.setAdd | ( | LSDDbAdmin | admin, | |
long | filesize | |||
) |
Update or Insert data into DB from object. lid and sid must be ok. The filesize is added to the size of the Storage.
admin | ||
filesize |
boolean openlsd.database.data.LSDDbStorage.setAddNoCommit | ( | LSDDbAdmin | admin, | |
long | filesize | |||
) |
Update or Insert data into DB from object. lid and sid must be ok. The filesize is added to the size of the Storage. No Commit is done.
admin | ||
filesize |
static boolean openlsd.database.data.LSDDbStorage.setAddSizeNoCommit | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
long | filesize | |||
) | [static] |
Update or Insert size into DB. lid and sid must be ok. The filesize is added to the size of the Storage. No Commit is done.
admin | ||
lid | ||
sid | ||
did | ||
filesize |
boolean openlsd.database.data.LSDDbStorage.insertNoCommit | ( | LSDDbAdmin | admin, | |
long | filesize | |||
) |
Insert data into DB from object. lid and sid must be ok. The filesize is added to the size of the Storage. No Commit is done.
admin | ||
filesize |
boolean openlsd.database.data.LSDDbStorage.update | ( | LSDDbAdmin | admin, | |
long | size, | |||
long | fdanew, | |||
int | hasdel | |||
) |
Update some Values into BD (size is set, not added)
admin | ||
size | ||
fdanew | ||
hasdel |
boolean openlsd.database.data.LSDDbStorage.updateNoCommit | ( | LSDDbAdmin | admin, | |
long | size, | |||
long | fdanew, | |||
int | hasdel | |||
) |
Update some Values into BD (size is set, not added) without commit
admin | ||
size | ||
fdanew | ||
hasdel |
static LSDLinkedLongList<LSDDbStorage> openlsd.database.data.LSDDbStorage.getStorages | ( | LSDDbAdmin | admin, | |
long | lid | |||
) | [static] |
Get all Storages associated with the lid from the DB.
admin | ||
lid |
static boolean openlsd.database.data.LSDDbStorage.del | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) | [static] |
Del the Legacy object from DB
admin | ||
lid | ||
sid |
static boolean openlsd.database.data.LSDDbStorage.delIfEmpty | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid | |||
) | [static] |
Del the Legacy object from DB if size <= 0
admin | ||
lid | ||
sid |
static int openlsd.database.data.LSDDbStorage.delStoragesIfEmpty | ( | LSDDbAdmin | admin, | |
long | lid | |||
) | [static] |
Del all Storages associated with the lid from the DB if empty
admin | ||
lid |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.getMaxIdxDocument | ( | LSDDbAdmin | admin | ) | [static, private] |
Return the Prepare Statement for get Max did of Document in one Legacy/Storage
admin |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.getHasDelDocument | ( | LSDDbAdmin | admin | ) | [static, private] |
Return the Prepare Statement for get HasDel Document in one Legacy/Storage
admin |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.getSizeDocument | ( | LSDDbAdmin | admin | ) | [static, private] |
Return the Prepare Statement for get Size from Document in one Legacy/Storage
admin |
static void openlsd.database.data.LSDDbStorage.checkStorageMT | ( | LSDDbAdmin | admin, | |
LSDDbLegacy | legacy, | |||
boolean | repair | |||
) | [static] |
Check Storage from Legacy with Document in DB with mini threading
admin | ||
legacy | ||
repair |
static void openlsd.database.data.LSDDbStorage.checkOneStorage | ( | LSDDbAdmin | admin, | |
LSDDbStorage | storage, | |||
LSDDbPreparedStatement | prepstmt1, | |||
LSDDbPreparedStatement | prepstmt2, | |||
LSDDbPreparedStatement | prepstmt3, | |||
LSDDbLegacy | legacy, | |||
FutureTask< Long >[] | tasks, | |||
ExecutorService | executorService, | |||
boolean | repair | |||
) | [static, private] |
Check one storage from one LSDDbStorage object
admin | ||
storage | ||
prepstmt1 | ||
prepstmt2 | ||
prepstmt3 | ||
legacy | ||
tasks | ||
executorService | ||
repair |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.getMaxValidFromStorage | ( | LSDDbAdmin | admin | ) | [static, private] |
Return the Prepare Statement for get Max valid did of Document in one Legacy/Storage
admin |
static LSDDbPreparedStatement openlsd.database.data.LSDDbStorage.deleteInvalidFromStorage | ( | LSDDbAdmin | admin | ) | [static, private] |
Return the Prepare Statement for delete invalid did of Document in one Legacy/Storage
admin |
static void openlsd.database.data.LSDDbStorage.purgeStorageMT | ( | LSDDbAdmin | admin, | |
LSDDbLegacy | legacy, | |||
boolean | repair, | |||
int | nbthread | |||
) | [static] |
Purge Storage from Legacy of empty Documents in DB with multithreading by storage
admin | ||
legacy | ||
repair | ||
nbthread |
static FutureTask<Long> openlsd.database.data.LSDDbStorage.purgeOneStorage | ( | LSDDbAdmin | admin, | |
LSDDbStorage | storage, | |||
LSDDbLegacy | legacy, | |||
ExecutorService | executorService, | |||
boolean | repair | |||
) | [static, private] |
Purge one storage from one LSDDbStorage object of unused invalid Documents
admin | ||
storage | ||
legacy | ||
executorService | ||
repair |
static boolean openlsd.database.data.LSDDbStorage.alterIndex | ( | LSDDbAdmin | admin | ) | [static] |
Alter rebuild all index associated with this Table
admin |
String openlsd.database.data.LSDDbStorage.toString | ( | ) |
Object to String
Legacy Id
Storage Id
Current size of the Legacy
Next available Document (Following Document Available)
Has this Storage some Deleted Document
final String openlsd.database.data.LSDDbStorage.table = " lsdstorage " [static] |
information for DB manipulation: Table name
final String [] openlsd.database.data.LSDDbStorage.fields [static] |
Initial value:
{"LID","SID","SIZESTO","FDA","HASDEL"}
final int openlsd.database.data.LSDDbStorage.rlid = 0 [static] |
DB field rank
final int openlsd.database.data.LSDDbStorage.rsid = 1 [static] |
DB field rank
final int openlsd.database.data.LSDDbStorage.rsize = 2 [static] |
DB field rank
final int openlsd.database.data.LSDDbStorage.rfda = 3 [static] |
DB field rank
final int openlsd.database.data.LSDDbStorage.rhasdel = 4 [static] |
DB field rank
final String openlsd.database.data.LSDDbStorage.allfields [static] |
final String openlsd.database.data.LSDDbStorage.insertfields [static, private] |
Initial value:
" ("+allfields+") "
final String openlsd.database.data.LSDDbStorage.index [static] |
Initial value:
"PK_STORAGE"+ " IDX_STO_LID"+" IDX_STO_LIDSIDSIZE"