Public Member Functions | |
LSDDbOp () | |
LSDDbOp (long idop, long lid, long sid, long did, String md5, long idip, int op, int status, Timestamp opdate) | |
boolean | get (ResultSet resultSet) |
boolean | set (LSDDbAdmin admin) |
boolean | insert (LSDDbAdmin admin, boolean isCommit) |
boolean | update (LSDDbAdmin admin, int status, boolean isCommit) |
boolean | del (LSDDbAdmin admin) |
String | toString () |
Static Public Member Functions | |
static boolean | newOp (LSDDbAdmin admin, ArrayList< LSDDbIpPort > listIpPort, long idip, long idOp, long lid, long sid, long did, String md5, int op, Timestamp opdate) |
static void | createOpFromCheck (LSDDbAdmin admin, long lid, long sid, long did, String md5, int op, Timestamp opdate, long idip, long idipto) |
static ArrayList< LSDDbOp > | getPrimaryOp (LSDDbAdmin admin) |
static void | setFromToSchedToTodo (LSDDbAdmin admin) |
static LinkedList< LSDDbOp > | getOps (LSDDbAdmin admin, long idop) |
static int | del (LSDDbAdmin admin, long idop, long lid, long sid, long did) |
static int | del (LSDDbAdmin admin, long idop, int op) |
static int | update (LSDDbAdmin admin, long idop, long lid, long sid, long did, int op, String md5, boolean isCommit) |
static long | findAvailableIdOp (LSDDbAdmin admin, boolean isCommit) |
static boolean | alterIndex (LSDDbAdmin admin) |
Public Attributes | |
long | idop = LSDConstants.invalide_idx |
long | lid = LSDConstants.invalide_idx |
long | sid = LSDConstants.invalide_idx |
long | did = LSDConstants.invalide_idx |
String | md5 = null |
long | idip = LSDConstants.invalide_idx |
int | op = -1 |
int | status = 0 |
Timestamp | opdate = null |
Static Public Attributes | |
static final int | OPStatusTodo = 0 |
static final int | OPStatusToSched = 1 |
static final int | OPStatusBeeing = 2 |
static final int | OPStatusError = 3 |
static final int | OPStatusDone = 4 |
static final int | OPcontrol = -1 |
static final int | OPnoop = 0 |
static final int | OPcheck = 1 |
static final int | OPinsert = 2 |
static final int | OPreplace = 3 |
static final int | OPdelete = 4 |
static final int | OPmove = 5 |
static final int | OPinserttoset = -2 |
static final int | OPreplacetoset = -3 |
static final int | OPdeletetoset = -4 |
static final int | OPmovetoset = -5 |
static final String | table = " lsdop " |
static final String[] | fields |
static final int | ridop = 0 |
static final int | rlid = 1 |
static final int | rsid = 2 |
static final int | rdid = 3 |
static final int | rmd5 = 4 |
static final int | ridip = 5 |
static final int | rop = 6 |
static final int | rstatus = 7 |
static final int | ropdate = 8 |
static final String | allfields |
static final String | index |
Static Private Attributes | |
static final String | insertfields |
openlsd.database.data.LSDDbOp.LSDDbOp | ( | ) |
Create an empty Op
openlsd.database.data.LSDDbOp.LSDDbOp | ( | long | idop, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
String | md5, | |||
long | idip, | |||
int | op, | |||
int | status, | |||
Timestamp | opdate | |||
) |
Create an Op from args
idop | ||
lid | ||
sid | ||
did | ||
md5 | ||
idip | ||
op | ||
status | ||
opdate |
boolean openlsd.database.data.LSDDbOp.get | ( | ResultSet | resultSet | ) |
Get Values from ResultSet
resultSet |
boolean openlsd.database.data.LSDDbOp.set | ( | LSDDbAdmin | admin | ) |
Update or Insert data into DB from object. If IdOp is KO, then try to create one.
admin |
boolean openlsd.database.data.LSDDbOp.insert | ( | LSDDbAdmin | admin, | |
boolean | isCommit | |||
) |
Insert data into DB from object. If IdOp is KO, then try to create one.
admin | ||
isCommit |
boolean openlsd.database.data.LSDDbOp.update | ( | LSDDbAdmin | admin, | |
int | status, | |||
boolean | isCommit | |||
) |
Update Status into BD
admin | ||
status | ||
isCommit |
static boolean openlsd.database.data.LSDDbOp.newOp | ( | LSDDbAdmin | admin, | |
ArrayList< LSDDbIpPort > | listIpPort, | |||
long | idip, | |||
long | idOp, | |||
long | lid, | |||
long | sid, | |||
long | did, | |||
String | md5, | |||
int | op, | |||
Timestamp | opdate | |||
) | [static] |
Create a new Ops from the List of IpPort for the same Service. All Op will have the same idOp and all args except idIp (taken from the list). The one with the same idip than the specified arg idip will have a specific status as OPStatusTodo (master one). The List listIpPort is not cleared after this call. No commit is done.
admin | ||
listIpPort | ||
idip | ||
idOp | ||
lid | ||
sid | ||
did | ||
md5 | ||
op | ||
opdate |
static void openlsd.database.data.LSDDbOp.createOpFromCheck | ( | LSDDbAdmin | admin, | |
long | lid, | |||
long | sid, | |||
long | did, | |||
String | md5, | |||
int | op, | |||
Timestamp | opdate, | |||
long | idip, | |||
long | idipto | |||
) | [static] |
Create Op for Check for the Document and IDIP as source and IDIPTO as target
admin | ||
lid | ||
sid | ||
did | ||
md5 | ||
op | ||
opdate | ||
idip | (source or referent) | |
idipto | (target) |
static ArrayList<LSDDbOp> openlsd.database.data.LSDDbOp.getPrimaryOp | ( | LSDDbAdmin | admin | ) | [static] |
Get the Primary Op object with status = OPStatusTodo
admin |
static void openlsd.database.data.LSDDbOp.setFromToSchedToTodo | ( | LSDDbAdmin | admin | ) | [static] |
Set all Op object with ToSched status to transform them to Todo status. Use after a stop of the OpHandler to restart properly or after each loop of OpHandler.
admin |
static LinkedList<LSDDbOp> openlsd.database.data.LSDDbOp.getOps | ( | LSDDbAdmin | admin, | |
long | idop | |||
) | [static] |
Get all Ops associated to idop from DB except the major one (OpStatusBeeing or OpStatusError)
admin | ||
idop |
boolean openlsd.database.data.LSDDbOp.del | ( | LSDDbAdmin | admin | ) |
Del this Op with no commit
admin |
static int openlsd.database.data.LSDDbOp.del | ( | LSDDbAdmin | admin, | |
long | idop, | |||
long | lid, | |||
long | sid, | |||
long | did | |||
) | [static] |
Del all Ops associated to idop, lid, sid, did from DB with No Commit
admin | ||
idop | ||
lid | ||
sid | ||
did |
static int openlsd.database.data.LSDDbOp.del | ( | LSDDbAdmin | admin, | |
long | idop, | |||
int | op | |||
) | [static] |
Del all Ops associated to idop, op from DB
admin | ||
idop | ||
op |
static int openlsd.database.data.LSDDbOp.update | ( | LSDDbAdmin | admin, | |
long | idop, | |||
long | lid, | |||
long | sid, | |||
long | did, | |||
int | op, | |||
String | md5, | |||
boolean | isCommit | |||
) | [static] |
Update all Ops associated to idop, lid, sid, did from DB to new op and md5 values
admin | ||
idop | ||
lid | ||
sid | ||
did | ||
op | ||
md5 | ||
isCommit |
static long openlsd.database.data.LSDDbOp.findAvailableIdOp | ( | LSDDbAdmin | admin, | |
boolean | isCommit | |||
) | [static] |
Get first available index for one IdOp
admin | ||
isCommit |
static boolean openlsd.database.data.LSDDbOp.alterIndex | ( | LSDDbAdmin | admin | ) | [static] |
Alter rebuild all index associated with this Table
admin |
String openlsd.database.data.LSDDbOp.toString | ( | ) |
Object to String
Legacy Id
Storage Id
Document Id
String openlsd.database.data.LSDDbOp.md5 = null |
MD5 for file
IpPort Id
int openlsd.database.data.LSDDbOp.op = -1 |
Op function
Status: 0 todo, 1, to schedule from, 2 beeing scheduled from, 3 done
When scheduled, a task move from
Timestamp openlsd.database.data.LSDDbOp.opdate = null |
Date (Timestamp) of this Op
final int openlsd.database.data.LSDDbOp.OPStatusTodo = 0 [static] |
Status TODO: first task which is referent
final int openlsd.database.data.LSDDbOp.OPStatusToSched = 1 [static] |
Status To Schedule from: first task which is referent for schedule
final int openlsd.database.data.LSDDbOp.OPStatusBeeing = 2 [static] |
Status beeing processed: tasks to be run
final int openlsd.database.data.LSDDbOp.OPStatusError = 3 [static] |
Status in Error: tasks in error
final int openlsd.database.data.LSDDbOp.OPStatusDone = 4 [static] |
Status DONE: tasks done, even scheduled one when all beeing are done
final int openlsd.database.data.LSDDbOp.OPcontrol = -1 [static] |
Function: control line in database
final int openlsd.database.data.LSDDbOp.OPnoop = 0 [static] |
Function: no operation
final int openlsd.database.data.LSDDbOp.OPcheck = 1 [static] |
Function: Check a Legacy
final int openlsd.database.data.LSDDbOp.OPinsert = 2 [static] |
Function: Insert a Document, also used after a move
final int openlsd.database.data.LSDDbOp.OPreplace = 3 [static] |
Function: Replace a Document (same as delete then import but no error due to async)
final int openlsd.database.data.LSDDbOp.OPdelete = 4 [static] |
Function: Delete a Document, also used after a delete
final int openlsd.database.data.LSDDbOp.OPmove = 5 [static] |
Function: Move a Document (same as delete then import the same document but no error due to async and optimized)
final int openlsd.database.data.LSDDbOp.OPinserttoset = -2 [static] |
Function: Insert a Document, also used after a move
final int openlsd.database.data.LSDDbOp.OPreplacetoset = -3 [static] |
Function: Replace a Document (same as delete then import but no error due to async)
final int openlsd.database.data.LSDDbOp.OPdeletetoset = -4 [static] |
Function: Delete a Document, also used after a delete
final int openlsd.database.data.LSDDbOp.OPmovetoset = -5 [static] |
Function: Move a Document (same as delete then import the same document but no error due to async and optimized)
final String openlsd.database.data.LSDDbOp.table = " lsdop " [static] |
information for DB manipulation: Table name
final String [] openlsd.database.data.LSDDbOp.fields [static] |
Initial value:
{"IDOP","LID","SID","DID","EMPREINT","IDIP","OP","STATUS","OPDATE"}
final int openlsd.database.data.LSDDbOp.ridop = 0 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rlid = 1 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rsid = 2 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rdid = 3 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rmd5 = 4 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.ridip = 5 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rop = 6 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.rstatus = 7 [static] |
DB field rank
final int openlsd.database.data.LSDDbOp.ropdate = 8 [static] |
DB field rank
final String openlsd.database.data.LSDDbOp.allfields [static] |
final String openlsd.database.data.LSDDbOp.insertfields [static, private] |
final String openlsd.database.data.LSDDbOp.index [static] |
Initial value:
"PK_OP"+ " IDX_OP_STATUSIDOPOPIDIP"