openlsm.autoimport
Class LSMImport

java.lang.Object
  extended by openlsd.appli.autoimport.commonimport.LSDImportAbstract
      extended by openlsm.autoimport.commonimport.LSMImportAbstract
          extended by openlsm.autoimport.LSMImport

public class LSMImport
extends LSMImportAbstract

Class to import files into DB and LSD for OpenLSM

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 LSMImport(LSDDbAdmin admin)
          Create a LSMImport from args
protected LSMImport(LSDLoadConfig llc)
          Create a LSMImport from args
 
Method Summary
static void main(java.lang.String[] args)
          Run auto import
 
Methods inherited from class openlsm.autoimport.commonimport.LSMImportAbstract
finalizeAfterImport, finalizeConnection, finishAfterAutoImport, getIndexFromString, initConnection, initializeArgs, initOptions, prepareImportQueue
 
Methods inherited from class openlsd.appli.autoimport.commonimport.LSDImportAbstract
errorFromPrepareImportQueue, finalizeAfterAutoImport, finalizeRegisterFile, getClientPutInfo, getClientPutInfoFromIpPort, getIpPortC, getIpPortP, getLegacy, initOneFileOption, initOptionsAuto, initRegisterFile, joinConnection, privateInitializeArgs, registerFalseFile, registerFalseFile, registerTrueFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSMImport

protected LSMImport(LSDLoadConfig llc)
Create a LSMImport from args

Parameters:
llc -

LSMImport

protected LSMImport(LSDDbAdmin admin)
Create a LSMImport from args

Parameters:
admin -
Method Detail

main

public static void main(java.lang.String[] args)
Run auto 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
-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) (MANDATORY since OpenLSM suppose only one Legacy by import)
-idip set the idip of the target OpenLSD Server (should be either Protected or Compressed ports id)
As third group of args:
-source sourcefile (containing a list of "file lid idb" where lid is not there if -samelid is set)