openlsd.multiple.autoimport
Class LSDImport

java.lang.Object
  extended by openlsd.appli.autoimport.commonimport.LSDImportAbstract
      extended by openlsd.multiple.autoimport.LSDImport

public class LSDImport
extends LSDImportAbstract

Class to import files into DB and LSD. ML Version

Author:
Frederic Bregier LGPL

Field Summary
 
Fields inherited from class openlsd.appli.autoimport.commonimport.LSDImportAbstract
admin, async, blockmode, countKO, countOK, date_debut, dbconns, dir1, doneQueue, errorList, ext1, extidb, extKO, extOK, extStop, file0, fileKO, filename2Out, fileOK, isCompressed, isSameLid, istesting, KO, lcd, lci, lcp, lcps, lid0, listFiles, listline, llc, lsdb, nbFile, nbthread, option, passwd, sameDbConnMyltithread, sameLegacy, sameLid, source2, targetIdip, todelete, todoQueue, todoQueueB, todoQueueBLocal, todoQueueLocal, todoQueues, todoQueuesB, use2Out
 
Constructor Summary
protected LSDImport(LSDDbAdmin admin)
          Create a LSDImport from args
protected LSDImport(LSDLoadConfig llc)
          Create a LSDImport from args
 
Method Summary
static void main(java.lang.String[] args)
          Run import
 
Methods inherited from class openlsd.appli.autoimport.commonimport.LSDImportAbstract
errorFromPrepareImportQueue, finalizeAfterAutoImport, finalizeAfterImport, finalizeConnection, finalizeRegisterFile, finishAfterAutoImport, getClientPutInfo, getClientPutInfoFromIpPort, getIndexFromString, getIpPortC, getIpPortP, getLegacy, initConnection, initializeArgs, initOneFileOption, initOptions, initOptionsAuto, initRegisterFile, joinConnection, prepareImportQueue, privateInitializeArgs, registerFalseFile, registerFalseFile, registerTrueFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSDImport

protected LSDImport(LSDLoadConfig llc)
Create a LSDImport from args

Parameters:
llc -

LSDImport

protected LSDImport(LSDDbAdmin admin)
Create a LSDImport from args

Parameters:
admin -
Method Detail

main

public static void main(java.lang.String[] args)
Run import

Parameters:
args - with the config filename as first arg. As second group of args:
-testing set the import as testing mode for simple test where idmetier get the curdate added: not for use in production
-nbthread nbthread (set the number of threads)
-async set the connection mode to OpenLSD Server as asynchrone (first launch connection, then do other stuff, then join the connection
-dbconn set that each thread will have its own db connexion, less efficient solution but less database connection
-nodelete set no delete file after import but save one file with same name and extension=".ok" or ".ko" according to the import status. Only one option can be set between -delete and -nodelete.
-delete (default option) delete file when correctly imported or save one file with the same name and extension=".ko". Only one option can be set between -delete and -nodelete.
-2out set the out status to 2 files in the import source directory, one ".ok", another one ".ko" according to the import status
-compressed set the connection mode to OpenLSD Server as using a compressed mode (useful only in Net mode where files can be compressed)
-samelid lid
where it specifies that it will be the same lid for all files (optimization) (by default, if not specified, not the same lid)
-idip set the idip of the target OpenLSD Server (should be either Protected or Compressed ports id)
As third group of args where one only of those can be set:
-dir directory extension (each file has one file with same name and the extension containing "lid idb")
-file file lid idb
-source sourcefile (containing a list of "file lid idb" where lid is not there if -samelid is set)