Static Public Member Functions | |
static long | computeSize (long size) |
static double[] | getGlobalUsedFreeSpace (File storage) |
static double[] | getUsedSpace (File storage) |
static double[] | getUsedSpace (File storage, boolean useCFunc) |
static String | idUniqueTosubPath (long idUnique) |
static void | computeNbThreads () |
static boolean | isIdUniqueKO (long idUnique) |
static void | initConfigLogger (String file) |
static void | startLogger (Class classtype) |
Static Public Attributes | |
static final boolean | ISJAVA6 = false |
static final long | RETRYINMS = 10 |
static final int | RETRYNB = 3 |
static final int | BUFFERSIZEDEFAULT = 65536 |
static final int | NBLINEOP = 190 |
static final boolean | useCFunctions = true |
static final boolean | DEBUG = false |
static final boolean | LOGGING = false |
static final long | SIZEBLOCKFS = 4096 |
static final double | DSIZEBLOCKFS = 4096.0 |
static boolean | useNIO = true |
static int | TIMEEXIT = 100 |
static int | TIMEOUT = 60 |
static final int | TIMEOUTMIN = 20 |
static int | TIMEOUTKEEPALIVE = 50 |
static int | TIMEOUTCON = 10000 |
static final int | TIMEOUTCONMIN = 1000 |
static int | BACKLOG = 400 |
static int | BLOCKSIZE = 16277 |
static final int | MESSAGESIZE = 107 |
static int | TCPBLOCKSIZE = BLOCKSIZE+MESSAGESIZE |
static final int | MINBLOCKSIZE = 1024 |
static int | SERVER_THREAD = 64 |
static int | CLIENT_THREAD = 2 |
static int | CLIENT_INSTANCE_THREAD = 3 |
static String | BUSINESSCLASSNAME = "openlsd.business.LSDBusinessImpl" |
static String | FASTMD5_LIBPATH |
static String | GETFILEFROMPATH_PATH |
static String | WEBOPENDU_PATH |
static String | WEBDF_PATH = "df -kP " |
static String | RUNWEBLSDSERVER_PATH |
static String | RUNWEBLSDCHECK_PATH |
static String | SLF4J_PATH = "D:/LSD/slf4j-server.xml" |
static final boolean | ISUNIX = (!System.getProperty("os.name").toLowerCase().startsWith("windows")) |
static boolean | ISWEB = false |
static final String | LSDSESSIONATTR = "LS" |
static int | typeDriver = -1 |
static final int | typeMySQL = 0 |
static final int | typeOracle = 1 |
static final int | typePostgresql = 2 |
static boolean | isSGBDLocal = false |
static final int | MAXIMUM_FILELIST = 500 |
static final byte | LSD_GET = 'g' |
static final byte | LSD_GETASYNC = 'G' |
static final byte | LSD_PUT = 'p' |
static final byte | LSD_PUTASYNC = 'P' |
static final byte | LSD_PUTFILE = 'F' |
static final byte | LSD_MOVE = 'm' |
static final byte | LSD_LEGMOVE = 'l' |
static final byte | LSD_SIZE = 'S' |
static final byte | LSD_EXIST = 'E' |
static final byte | LSD_COPY = 'C' |
static final byte | LSD_LIST = 'L' |
static final byte | LSD_LISTMD5 = '5' |
static final byte | LSD_AEXIST = 'A' |
static final byte | LSD_AEXISTMD5 = 'M' |
static final byte | LSD_SESSIONINFO = 'I' |
static final byte | LSD_START = 's' |
static final byte | LSD_STOP = 't' |
static final byte | LSD_SHUTDOWN = 'h' |
static final byte | LSD_SHUTDOWNIMMEDIATE = 'H' |
static final byte | LSD_RESTART = 'r' |
static final byte | LSD_ENABLE = 'e' |
static final byte | LSD_DISABLE = 'd' |
static final byte | LSD_CREATEDIR = 'c' |
static final byte | LSD_WIPEDIR = 'w' |
static final byte | LSD_WIPERECURDIR = 'W' |
static final byte | LSD_DEL = 'D' |
static final byte | LSD_UNAVAILABLE = 'X' |
static final byte | LSD_NULL = ' ' |
static final byte | LSD_MSG_CONTINUE = 1 |
static final byte | LSD_MSG_OK = 0 |
static final byte | LSD_MSG_KOSYSTEM = -1 |
static final byte | LSD_MSG_KOBADREQ = -2 |
static final byte | LSD_MSG_KOUNAVAIL = -3 |
static final byte | LSD_MSG_KONOPREVIOUS = -4 |
static final byte | LSD_MSG_KOBADCLIENT = -5 |
static final byte | LSD_MSG_KONOSERVICE = -6 |
static final int | LSD_RKADMIN = 0 |
static final int | LSD_RKUSER = 1 |
static final int | LSD_RKCOMP = 2 |
static final int | LSD_RKPROTECTED = 3 |
static Logger | logger = null |
static final long | invalide_idx = Long.MIN_VALUE |
static final long | minimal_idx = invalide_idx+1 |
static final long | maximal_idx = Long.MAX_VALUE-1 |
static final char | separator = '#' |
static final String | sseparator = "#" |
Static Private Member Functions | |
static double[] | getGlobalUsedFreeSpaceJava6 (File storage) |
static double[] | getGlobalUsedFreeSpaceJava5 (File storage) |
static double[] | getUsedSpaceOpenLSDDUinC (File storage) |
static double[] | getUsedSpaceJava (File storage) |
static double[] | getRecursiveUsedSpaceJava (File dirsource, double[]values) |
Static Private Attributes | |
static boolean | isLoggerInitialized = false |
static boolean | isLoggerBasedConfigured = false |
static String | configLoggerFile = null |
static long openlsd.common.LSDConstants.computeSize | ( | long | size | ) | [static] |
Compute size according to the Size of Block
size |
static double [] openlsd.common.LSDConstants.getGlobalUsedFreeSpace | ( | File | storage | ) | [static] |
Get the Global Used and Free space in KB
storage |
static double [] openlsd.common.LSDConstants.getGlobalUsedFreeSpaceJava6 | ( | File | storage | ) | [static, private] |
Get the Global Used and Free space in KB ONLY FROM JDK6
storage |
static double [] openlsd.common.LSDConstants.getGlobalUsedFreeSpaceJava5 | ( | File | storage | ) | [static, private] |
Get the Global Used and Free space in KB
storage |
static double [] openlsd.common.LSDConstants.getUsedSpaceOpenLSDDUinC | ( | File | storage | ) | [static, private] |
Get the Used space in KB with openlsddu command
storage |
static double [] openlsd.common.LSDConstants.getUsedSpaceJava | ( | File | storage | ) | [static, private] |
Get the Used space in KB with openlsddu command
storage |
static double [] openlsd.common.LSDConstants.getRecursiveUsedSpaceJava | ( | File | dirsource, | |
double[] | values | |||
) | [static, private] |
Get the Used space in KB with openlsddu command This version does used a recursive algorithm.
dirsource | ||
values |
static double [] openlsd.common.LSDConstants.getUsedSpace | ( | File | storage | ) | [static] |
Get the Used space in KB with openlsddu command
storage |
static double [] openlsd.common.LSDConstants.getUsedSpace | ( | File | storage, | |
boolean | useCFunc | |||
) | [static] |
Get the Used space in KB with openlsddu command
storage | ||
useCFunc |
static String openlsd.common.LSDConstants.idUniqueTosubPath | ( | long | idUnique | ) | [static] |
Constructs the subpath
idUnique |
static void openlsd.common.LSDConstants.computeNbThreads | ( | ) | [static] |
Compute number of threads for server from the real number of available processors.
static boolean openlsd.common.LSDConstants.isIdUniqueKO | ( | long | idUnique | ) | [static] |
Test if ths idUnique is KO
idUnique |
static void openlsd.common.LSDConstants.initConfigLogger | ( | String | file | ) | [static] |
Function to initialized the Logger from the Configuration file
file |
static void openlsd.common.LSDConstants.startLogger | ( | Class | classtype | ) | [static] |
Start the logger function with level
classtype |
final boolean openlsd.common.LSDConstants.ISJAVA6 = false [static] |
Is this running under JAVA6 (some optimisation)
final long openlsd.common.LSDConstants.RETRYINMS = 10 [static] |
Time elapse for retry in ms
final int openlsd.common.LSDConstants.RETRYNB = 3 [static] |
Number of retry before error
final int openlsd.common.LSDConstants.BUFFERSIZEDEFAULT = 65536 [static] |
Default size for buffers (NIO)
final int openlsd.common.LSDConstants.NBLINEOP = 190 [static] |
Number of Line to get in OpHandler at a time (ORACLE VARCHAR2 as a result of Procedure is limited to 4000 bytes, so up to 190 indexes)
final boolean openlsd.common.LSDConstants.useCFunctions = true [static] |
Use C functions
final boolean openlsd.common.LSDConstants.DEBUG = false [static] |
Mode debug: very verbose if logging enabled
final boolean openlsd.common.LSDConstants.LOGGING = false [static] |
Mode logging: partially verbose
final long openlsd.common.LSDConstants.SIZEBLOCKFS = 4096 [static] |
Size of one block in the filesystem: could be later in the Legacy definition.
JFS2 supports multiple file system block sizes of 512, 1024, 2048, and 4096, with 4 KBytes as standard.
EXT3 supports multiple file system block sizes of 1024, 2048 and 4096, with 4 KBytes as standard.
NTFS supports sizes of clusters from 512 bytes up to 64 KBytes, with 4 KBytes as standard.
final double openlsd.common.LSDConstants.DSIZEBLOCKFS = 4096.0 [static] |
Size of one block in the filesystem (double version): could be later in the Legacy definition.
boolean openlsd.common.LSDConstants.useNIO = true [static] |
Use NIO in MD5 functions
int openlsd.common.LSDConstants.TIMEEXIT = 100 [static] |
Nb of milliseconds before exit
int openlsd.common.LSDConstants.TIMEOUT = 60 [static] |
Nb of seconds after idle is in timeout (MUST BE MORE THAN TIMEOUTKEEPALIVE)
final int openlsd.common.LSDConstants.TIMEOUTMIN = 20 [static] |
Minimal Nb of seconds after idle is in timeout (MUST BE LESS THAN TIMEOUT)
int openlsd.common.LSDConstants.TIMEOUTKEEPALIVE = 50 [static] |
Nb of seconds after idle is in timeout for Keep Alive module (MUST BE LESS THAN TIMEOUT)
int openlsd.common.LSDConstants.TIMEOUTCON = 10000 [static] |
Nb of milliseconds after connexion is in timeout
final int openlsd.common.LSDConstants.TIMEOUTCONMIN = 1000 [static] |
Minimal Nb of milliseconds after connexion is in timeout
int openlsd.common.LSDConstants.BACKLOG = 400 [static] |
Queue length of ServerSocket (Acceptor) (Backlog)
int openlsd.common.LSDConstants.BLOCKSIZE = 16277 [static] |
Size by default of block size for receive/sending files. MAX should be close to 8192-104 or (x*8192)-104
final int openlsd.common.LSDConstants.MESSAGESIZE = 107 [static] |
General Size of one Message except bytes array
int openlsd.common.LSDConstants.TCPBLOCKSIZE = BLOCKSIZE+MESSAGESIZE [static] |
Real TCP BlockSize
final int openlsd.common.LSDConstants.MINBLOCKSIZE = 1024 [static] |
Minimum size for block for receive/sending files
int openlsd.common.LSDConstants.SERVER_THREAD = 64 [static] |
Default number of threads in pool for Server
int openlsd.common.LSDConstants.CLIENT_THREAD = 2 [static] |
Default number of threads in pool for Client (Mina's pool)
int openlsd.common.LSDConstants.CLIENT_INSTANCE_THREAD = 3 [static] |
Default number of instance for Client (different than Thread in Mina Pool)
String openlsd.common.LSDConstants.BUSINESSCLASSNAME = "openlsd.business.LSDBusinessImpl" [static] |
LSDBusinessImpl full class name
String openlsd.common.LSDConstants.FASTMD5_LIBPATH [static] |
Initial value:
"/app/data2/LSD/LIB/MD5.so"
String openlsd.common.LSDConstants.GETFILEFROMPATH_PATH [static] |
Initial value:
"/app/data2/LSD/BIN/getFileFromPath3"
String openlsd.common.LSDConstants.WEBOPENDU_PATH [static] |
Initial value:
"/app/data2/LSD/BIN/openlsddu"
String openlsd.common.LSDConstants.WEBDF_PATH = "df -kP " [static] |
Default command for getting df -k if JAVA5
String openlsd.common.LSDConstants.RUNWEBLSDSERVER_PATH [static] |
Initial value:
"C:/Program\\ Files/Java/jdk1.5.0_06/jre/bin/java " + "-server -Xms64m -Xmx256m -cp " + "D:/Java/ALLJARS/OpenLSD2-Server-obf.jar;" + "D:/Java/ALLJARS/OpenLSD2-Client-obf.jar;" + "D:/Java/ALLJARS/dom4j-1.6.1.jar;" + "D:/Java/ALLJARS/fast_md5.jar;" + "D:/Java/ALLJARS/jaxen-1.1-beta-6.jar;" + "D:/Java/ALLJARS/jzlib-1.0.7.jar;" + "D:/Java/ALLJARS/mina-java5.jar;" + "D:/Java/ALLJARS/nslf4j-1.2.25.jar " + "openlsd.network.server.LSDServer"
String openlsd.common.LSDConstants.RUNWEBLSDCHECK_PATH [static] |
Initial value:
"C:/Program\\ Files/Java/jdk1.5.0_06/jre/bin/java " + "-server -Xms64m -Xmx256m -cp " + "D:/Java/ALLJARS/OpenLSD2-Server-obf.jar;" + "D:/Java/ALLJARS/OpenLSD2-Client-obf.jar;" + "D:/Java/ALLJARS/dom4j-1.6.1.jar;" + "D:/Java/ALLJARS/fast_md5.jar;" + "D:/Java/ALLJARS/jaxen-1.1-beta-6.jar;" + "D:/Java/ALLJARS/jzlib-1.0.7.jar;" + "D:/Java/ALLJARS/mina-java5.jar;" + "D:/Java/ALLJARS/nslf4j-1.2.25.jar;" + "D:/Java/ALLJARS/mysql-connector-java-5.0.4-bin.jar " + "openlsd.server.admin.LSDCheckInDBThreaded"
String openlsd.common.LSDConstants.SLF4J_PATH = "D:/LSD/slf4j-server.xml" [static] |
Default position of the SLF4J configuration file
final boolean openlsd.common.LSDConstants.ISUNIX = (!System.getProperty("os.name").toLowerCase().startsWith("windows")) [static] |
Hack to say Windows or Unix (USR1 not OK on Windows)
boolean openlsd.common.LSDConstants.ISWEB = false [static] |
Is the Client in Web format
final String openlsd.common.LSDConstants.LSDSESSIONATTR = "LS" [static] |
Identify LSD Session as an attribute
int openlsd.common.LSDConstants.typeDriver = -1 [static] |
0 = MySQL, 1 = Oracle, ...
default value but modified dynamically
final int openlsd.common.LSDConstants.typeMySQL = 0 [static] |
Type of DB: MySQL
final int openlsd.common.LSDConstants.typeOracle = 1 [static] |
Type of DB: Oracle
final int openlsd.common.LSDConstants.typePostgresql = 2 [static] |
Type of DB: PostGreSQL
boolean openlsd.common.LSDConstants.isSGBDLocal = false [static] |
Is the SGBD local to the OpenLSD Server
final int openlsd.common.LSDConstants.MAXIMUM_FILELIST = 500 [static] |
Maximum number of file in list (AEXIST, LIST) : nb*100
final byte openlsd.common.LSDConstants.LSD_GET = 'g' [static] |
Unchangable values
Commands byte Client (with or without compression) : Get
get a file
final byte openlsd.common.LSDConstants.LSD_GETASYNC = 'G' [static] |
Client (with or without compression) : GetNAck
get a file in async mode (1 ack only)
final byte openlsd.common.LSDConstants.LSD_PUT = 'p' [static] |
Client (with or without compression) or Admin or Protected : Put
put a new file
final byte openlsd.common.LSDConstants.LSD_PUTASYNC = 'P' [static] |
Client (with or without compression) or Admin or Protected : PutNAck
put a new file in async mode (1 ack only)
final byte openlsd.common.LSDConstants.LSD_PUTFILE = 'F' [static] |
Client (direct access for the server to the filesystem) or Admin or Protected : PutFilename
put a new file with a path to access to the file
final byte openlsd.common.LSDConstants.LSD_MOVE = 'm' [static] |
Admin or Protected : Move
move an existing file inside one same legacy
final byte openlsd.common.LSDConstants.LSD_LEGMOVE = 'l' [static] |
Admin or Protected : Move
move between legacy
final byte openlsd.common.LSDConstants.LSD_SIZE = 'S' [static] |
Admin : Info
size of file
final byte openlsd.common.LSDConstants.LSD_EXIST = 'E' [static] |
Admin : Info
is file exist physically (and optionally tests its MD5)
final byte openlsd.common.LSDConstants.LSD_COPY = 'C' [static] |
Admin : Copy
copy the file in the out dir
final byte openlsd.common.LSDConstants.LSD_LIST = 'L' [static] |
Admin : List
list all files in the legacy
final byte openlsd.common.LSDConstants.LSD_LISTMD5 = '5' [static] |
Admin : List
list all files in the legacy with their MD5
final byte openlsd.common.LSDConstants.LSD_AEXIST = 'A' [static] |
Admin : List
are the file in array (string) exist physically
final byte openlsd.common.LSDConstants.LSD_AEXISTMD5 = 'M' [static] |
Admin : List
are the file in array (string) exist physically and same MD5
final byte openlsd.common.LSDConstants.LSD_SESSIONINFO = 'I' [static] |
Admin : Info
list all sessions and their status
final byte openlsd.common.LSDConstants.LSD_START = 's' [static] |
Admin : Admin
start user service (legacy = 0 => not compressed, 1 => compressed)
final byte openlsd.common.LSDConstants.LSD_STOP = 't' [static] |
Admin : Admin
stop user service (legacy = 0 => not compressed, 1 => compressed)
final byte openlsd.common.LSDConstants.LSD_SHUTDOWN = 'h' [static] |
Admin : Admin
shutdown all services
final byte openlsd.common.LSDConstants.LSD_SHUTDOWNIMMEDIATE = 'H' [static] |
Admin : Admin
shutdown all services immediately
final byte openlsd.common.LSDConstants.LSD_RESTART = 'r' [static] |
Admin : Admin
stop then start user service (legacy = 0 => not compressed, 1 => compressed)
final byte openlsd.common.LSDConstants.LSD_ENABLE = 'e' [static] |
Admin : Admin
enable the Legacy dynamically
final byte openlsd.common.LSDConstants.LSD_DISABLE = 'd' [static] |
Admin : Admin
disable the Legacy dynamically
final byte openlsd.common.LSDConstants.LSD_CREATEDIR = 'c' [static] |
Admin : Admin
Create the drectories for Legacy(with or without storage)
final byte openlsd.common.LSDConstants.LSD_WIPEDIR = 'w' [static] |
Admin : Admin
Wipe directory for Legacy(with or without storage)
final byte openlsd.common.LSDConstants.LSD_WIPERECURDIR = 'W' [static] |
Admin : Admin
Wipe recursively directories for Legacy(with or without storage)
final byte openlsd.common.LSDConstants.LSD_DEL = 'D' [static] |
Protected : Del
delete a file
final byte openlsd.common.LSDConstants.LSD_UNAVAILABLE = 'X' [static] |
UNAVAILABLE : All
final byte openlsd.common.LSDConstants.LSD_NULL = ' ' [static] |
null command
final byte openlsd.common.LSDConstants.LSD_MSG_CONTINUE = 1 [static] |
Message status values The status is OK and should continue (not final block)
final byte openlsd.common.LSDConstants.LSD_MSG_OK = 0 [static] |
The status is OK and is the final block or unique block
final byte openlsd.common.LSDConstants.LSD_MSG_KOSYSTEM = -1 [static] |
The status is KO since a System failure
final byte openlsd.common.LSDConstants.LSD_MSG_KOBADREQ = -2 [static] |
The status is KO since a bad request failure (bad command or bad arguments)
final byte openlsd.common.LSDConstants.LSD_MSG_KOUNAVAIL = -3 [static] |
The status is KO since the given resource is unavailable
final byte openlsd.common.LSDConstants.LSD_MSG_KONOPREVIOUS = -4 [static] |
The status is KO since a System failure but cannot get back to previous stable state (very bad)
final byte openlsd.common.LSDConstants.LSD_MSG_KOBADCLIENT = -5 [static] |
The status is KO since the client arguments are in bad status
final byte openlsd.common.LSDConstants.LSD_MSG_KONOSERVICE = -6 [static] |
The status is KO since the service or LSD is not available
final int openlsd.common.LSDConstants.LSD_RKADMIN = 0 [static] |
Message identifying which server Id for Admin server
final int openlsd.common.LSDConstants.LSD_RKUSER = 1 [static] |
Id for User server
final int openlsd.common.LSDConstants.LSD_RKCOMP = 2 [static] |
Id for User with Compression server
final int openlsd.common.LSDConstants.LSD_RKPROTECTED = 3 [static] |
Id for Protected server
Logger openlsd.common.LSDConstants.logger = null [static] |
Default logger
final long openlsd.common.LSDConstants.invalide_idx = Long.MIN_VALUE [static] |
Default invalid value index : -2^63 values
final long openlsd.common.LSDConstants.minimal_idx = invalide_idx+1 [static] |
Default minimal value index : -2^63+1 values
final long openlsd.common.LSDConstants.maximal_idx = Long.MAX_VALUE-1 [static] |
Default maximal value index : 2^63-2 values
final char openlsd.common.LSDConstants.separator = '#' [static] |
Default separator in String buffer in case of List
final String openlsd.common.LSDConstants.sseparator = "#" [static] |
Same as separator in String format
boolean openlsd.common.LSDConstants.isLoggerInitialized = false [static, private] |
Variable set when Logger is Initialized
boolean openlsd.common.LSDConstants.isLoggerBasedConfigured = false [static, private] |
Variable set when based configuration is done
String openlsd.common.LSDConstants.configLoggerFile = null [static, private] |
The path to the configuration file for Logging