openlsd.multiple.ophandler.LSDOpHandler Class Reference
List of all members.
Detailed Description
This class implements the Op Handler which is responsible of Delete, Import, Check in asynchronous mode with other OpenLSD Server that are mirror from a principal one.
- Author:
- Frederic BREGIER LGPL 2007
Constructor & Destructor Documentation
openlsd.multiple.ophandler.LSDOpHandler.LSDOpHandler |
( |
LSDLoadConfig |
llc |
) |
|
Member Function Documentation
int openlsd.multiple.ophandler.LSDOpHandler.initializeArgs |
( |
String[] |
args, |
|
|
int |
curargs | |
|
) |
| | [private] |
Get arguments
- Parameters:
-
- Returns:
- the next current rank
static void openlsd.multiple.ophandler.LSDOpHandler.main |
( |
String[] |
args |
) |
[static] |
Start the Op Handler with the configdb filename as first argument, then:
-nbthread nbthread to specify how many thread will be used
-stop filepath (mandatory) to specify what is the stop file (the existence of this file stops the process)
-delay time in ms to specify the delay between two scans of database
-exportop filepath to specify the path/filename where rank.export will be added as export of operation logs to enable redo operation on copied databases if any for ML support with database replication. The file format is "idip;op;lid;sid;did" where idip is the id of one ML LSD Server, op is 2 for insert, 3 for delete.
-nbstep numberStep to set a limit on number of files referenced in exoprtop file as numberStep*190*3*nbThread
-portctl port where OpHandler will listen in HTTP mode for administration
-passwd passwd OpHandler shutdown through HTTP will compare to this passwd (Mandatory if HTTP Admin interface is wanted)
- Parameters:
-
void openlsd.multiple.ophandler.LSDOpHandler.runOpHandler |
( |
|
) |
[private] |
void openlsd.multiple.ophandler.LSDOpHandler.producerConsummer |
( |
Semaphore |
startSignal, |
|
|
Semaphore |
doneSignal | |
|
) |
| | [protected] |
Produce some work for Consummer
Get Op object from database where status = Todo and function = import or delete or others in asc order
If filestop is found then stop
When a delete or similar op is found, goes to sequential Mode; else does in multithreaded mode
- Parameters:
-
long openlsd.multiple.ophandler.LSDOpHandler.incrementFile |
( |
long |
reuseExport |
) |
[private] |
Increment possibly the output file
- Parameters:
-
- Returns:
- the new reuseExport rank
static boolean openlsd.multiple.ophandler.LSDOpHandler.trueCreateNewFile |
( |
|
) |
[static, private] |
Internal function to really create output file
- Returns:
- True if OK, else False
static boolean openlsd.multiple.ophandler.LSDOpHandler.createNewFile |
( |
|
) |
[static, private] |
Close the previous temp file and create a new one
- Returns:
- True if OK, else False
static boolean openlsd.multiple.ophandler.LSDOpHandler.closeFile |
( |
|
) |
[static, private] |
Close the final temp file
- Returns:
- true if OK, else false
static void openlsd.multiple.ophandler.LSDOpHandler.addWriteFile |
( |
LSDDbOp |
newop |
) |
[static] |
Write the Op done to the export File
- Parameters:
-
static void openlsd.multiple.ophandler.LSDOpHandler.flushFile |
( |
|
) |
[static] |
void openlsd.multiple.ophandler.LSDOpHandler.finalizeConnection |
( |
|
) |
[private] |
Finalize any connections that are still opened.
static void openlsd.multiple.ophandler.LSDOpHandler.terminate |
( |
boolean |
exit |
) |
[static] |
Terminate in case of Signal or Big error !
- Parameters:
-
| exit | If True, will call System.exit |
static void openlsd.multiple.ophandler.LSDOpHandler.terminate |
( |
|
) |
[static] |
Terminate in case of Signal or Big error !
static void openlsd.multiple.ophandler.LSDOpHandler.initSignalHandler |
( |
|
) |
[static, private] |
Signal Handler initialization: enables a better shutdown of socket
Member Data Documentation
DB Admin objects for Executors
File that stops the process when it exists for AutoImport
True as long as the file that stops the process does not exist
Delay between two get in todo queue when no Op is available
Export info on files to redo SQL orders: path and filename where <rank>.export will be added
How many files * 190 * nbThread will be in the fileExport
Multiple DB Access support
Extension of temp export file
The documentation for this class was generated from the following file:
- OpenLSD/Multiple/openlsd/multiple/ophandler/LSDOpHandler.java