|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object openlsd.common.LSDConstants
public class LSDConstants
Global Constants for Client and Server. Some are static final, some are static only.
Field Summary | |
---|---|
static int |
BACKLOG
Queue length of ServerSocket (Acceptor) (Backlog) |
static int |
BLOCKSIZE
Size by default of block size for receive/sending files. |
static int |
BUFFERSIZEDEFAULT
Default size for buffers (NIO) |
static java.lang.String |
BUSINESSCLASSNAME
LSDBusinessImpl full class name |
static int |
CLIENT_INSTANCE_THREAD
Default number of instance for Client (different than Thread in Mina Pool) |
static int |
CLIENT_THREAD
Default number of threads in pool for Client (Mina's pool) |
static boolean |
DEBUG
Mode debug: very verbose if logging enabled |
static double |
DSIZEBLOCKFS
Size of one block in the filesystem (double version): could be later in the Legacy definition. |
static java.lang.String |
FASTMD5_LIBPATH
Default position of MD5 library (C) for FAST MD5 Package |
static java.lang.String |
GETFILEFROMPATH_PATH
Default position of getFileFromPath (C) functions |
static long |
invalide_idx
Default invalid value index : -2^63 values |
static boolean |
ISJAVA6
Is this running under JAVA6 (some optimisation) |
static boolean |
isSGBDLocal
Is the SGBD local to the OpenLSD Server |
static boolean |
ISUNIX
Hack to say Windows or Unix (USR1 not OK on Windows) |
static boolean |
ISWEB
Is the Client in Web format |
static ch.qos.logback.classic.Logger |
logger
Default logger |
static boolean |
LOGGING
Mode logging: partially verbose |
static byte |
LSD_AEXIST
Admin : List are the file in array (string) exist physically |
static byte |
LSD_AEXISTMD5
Admin : List are the file in array (string) exist physically and same MD5 |
static byte |
LSD_COPY
Admin : Copy copy the file in the out dir |
static byte |
LSD_CREATEDIR
Admin : Admin Create the drectories for Legacy(with or without storage) |
static byte |
LSD_DEL
Protected : Del delete a file |
static byte |
LSD_DISABLE
Admin : Admin disable the Legacy dynamically |
static byte |
LSD_ENABLE
Admin : Admin enable the Legacy dynamically |
static byte |
LSD_EXIST
Admin : Info is file exist physically (and optionally tests its MD5) |
static byte |
LSD_GET
Client (with or without compression) : Get get a file |
static byte |
LSD_GETASYNC
Client (with or without compression) : GetNAck get a file in async mode (1 ack only) |
static byte |
LSD_LEGMOVE
Admin or Protected : Move move between legacy |
static byte |
LSD_LIST
Admin : List list all files in the legacy |
static byte |
LSD_LISTMD5
Admin : List list all files in the legacy with their MD5 |
static byte |
LSD_MOVE
Admin or Protected : Move move an existing file inside one same legacy |
static byte |
LSD_MSG_CONTINUE
The status is OK and should continue (not final block) |
static byte |
LSD_MSG_KOBADCLIENT
The status is KO since the client arguments are in bad status |
static byte |
LSD_MSG_KOBADREQ
The status is KO since a bad request failure (bad command or bad arguments) |
static byte |
LSD_MSG_KONOPREVIOUS
The status is KO since a System failure but cannot get back to previous stable state (very bad) |
static byte |
LSD_MSG_KONOSERVICE
The status is KO since the service or LSD is not available |
static byte |
LSD_MSG_KOSYSTEM
The status is KO since a System failure |
static byte |
LSD_MSG_KOUNAVAIL
The status is KO since the given resource is unavailable |
static byte |
LSD_MSG_OK
The status is OK and is the final block or unique block |
static byte |
LSD_NULL
null command |
static byte |
LSD_PUT
Client (with or without compression) or Admin or Protected : Put put a new file |
static byte |
LSD_PUTASYNC
Client (with or without compression) or Admin or Protected : PutNAck put a new file in async mode (1 ack only) |
static byte |
LSD_PUTFILE
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 |
static byte |
LSD_RESTART
Admin : Admin stop then start user service (legacy = 0 => not compressed, 1 => compressed) |
static int |
LSD_RKADMIN
Id for Admin server |
static int |
LSD_RKCOMP
Id for User with Compression server |
static int |
LSD_RKPROTECTED
Id for Protected server |
static int |
LSD_RKUSER
Id for User server |
static byte |
LSD_SESSIONINFO
Admin : Info list all sessions and their status |
static byte |
LSD_SHUTDOWN
Admin : Admin shutdown all services |
static byte |
LSD_SHUTDOWNIMMEDIATE
Admin : Admin shutdown all services immediately |
static byte |
LSD_SIZE
Admin : Info size of file |
static byte |
LSD_START
Admin : Admin start user service (legacy = 0 => not compressed, 1 => compressed) |
static byte |
LSD_STOP
Admin : Admin stop user service (legacy = 0 => not compressed, 1 => compressed) |
static byte |
LSD_UNAVAILABLE
UNAVAILABLE : All |
static byte |
LSD_WIPEDIR
Admin : Admin Wipe directory for Legacy(with or without storage) |
static byte |
LSD_WIPERECURDIR
Admin : Admin Wipe recursively directories for Legacy(with or without storage) |
static java.lang.String |
LSDSESSIONATTR
Identify LSD Session as an attribute |
static long |
maximal_idx
Default maximal value index : 2^63-2 values |
static int |
MAXIMUM_FILELIST
Maximum number of file in list (AEXIST, LIST) : nb*100 |
static int |
MESSAGESIZE
General Size of one Message except bytes array |
static int |
MINBLOCKSIZE
Minimum size for block for receive/sending files |
static long |
minimal_idx
Default minimal value index : -2^63+1 values |
static int |
NBLINEOP
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) |
static long |
RETRYINMS
Time elapse for retry in ms |
static int |
RETRYNB
Number of retry before error |
static java.lang.String |
RUNWEBLSDCHECK_PATH
Default position for running Check of LSD Legacies from Tomcat Admin |
static java.lang.String |
RUNWEBLSDSERVER_PATH
Default position for running LSD Server from Tomcat Admin |
static char |
separator
Default separator in String buffer in case of List |
static int |
SERVER_THREAD
Default number of threads in pool for Server |
static long |
SIZEBLOCKFS
Size of one block in the filesystem: could be later in the Legacy definition. |
static java.lang.String |
SLF4J_PATH
Default position of the SLF4J configuration file |
static java.lang.String |
sseparator
Same as separator in String format |
static int |
TCPBLOCKSIZE
Real TCP BlockSize |
static int |
TIMEEXIT
Nb of milliseconds before exit |
static int |
TIMEOUT
Nb of seconds after idle is in timeout (MUST BE MORE THAN TIMEOUTKEEPALIVE) |
static int |
TIMEOUTCON
Nb of milliseconds after connexion is in timeout |
static int |
TIMEOUTCONMIN
Minimal Nb of milliseconds after connexion is in timeout |
static int |
TIMEOUTKEEPALIVE
Nb of seconds after idle is in timeout for Keep Alive module (MUST BE LESS THAN TIMEOUT) |
static int |
TIMEOUTMIN
Minimal Nb of seconds after idle is in timeout (MUST BE LESS THAN TIMEOUT) |
static int |
typeDriver
0 = MySQL, 1 = Oracle, ... |
static int |
typeMySQL
Type of DB: MySQL |
static int |
typeOracle
Type of DB: Oracle |
static int |
typePostgresql
Type of DB: PostGreSQL |
static boolean |
useCFunctions
Use C functions |
static boolean |
useNIO
Use NIO in MD5 functions |
static java.lang.String |
WEBDF_PATH
Default command for getting df -k if JAVA5 |
static java.lang.String |
WEBOPENDU_PATH
Default command for getting openlsddu (almost same as du but faster) |
static int |
WEBRETRIEVENOACKLIMIT
Limit size where NoAck method will be used (in Web retrieve functions) |
Constructor Summary | |
---|---|
LSDConstants()
|
Method Summary | |
---|---|
static void |
computeNbThreads()
Compute number of threads for server from the real number of available processors. |
static long |
computeSize(long size)
Compute size according to the Size of Block |
static double[] |
getGlobalUsedFreeSpace(java.io.File storage)
Get the Global Used and Free space in KB |
static double[] |
getUsedSpace(java.io.File storage)
Get the Used space in KB with openlsddu command |
static double[] |
getUsedSpace(java.io.File storage,
boolean useCFunc)
Get the Used space in KB with openlsddu command |
static java.lang.String |
idUniqueTosubPath(long idUnique)
Constructs the subpath |
static void |
initConfigLogger(java.lang.String file)
Function to initialized the Logger from the Configuration file |
static boolean |
isIdUniqueKO(long idUnique)
Test if ths idUnique is KO |
static void |
startLogger(java.lang.Class classtype)
Start the logger function with level |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean ISJAVA6
public static final long RETRYINMS
public static final int RETRYNB
public static final int BUFFERSIZEDEFAULT
public static final int NBLINEOP
public static final boolean useCFunctions
public static final boolean DEBUG
public static final boolean LOGGING
public static final long SIZEBLOCKFS
public static final double DSIZEBLOCKFS
public static boolean useNIO
public static int TIMEEXIT
public static int TIMEOUT
public static final int TIMEOUTMIN
public static int TIMEOUTKEEPALIVE
public static int TIMEOUTCON
public static final int TIMEOUTCONMIN
public static int BACKLOG
public static int BLOCKSIZE
public static final int MESSAGESIZE
public static int TCPBLOCKSIZE
public static final int MINBLOCKSIZE
public static final int WEBRETRIEVENOACKLIMIT
public static int SERVER_THREAD
public static int CLIENT_THREAD
public static int CLIENT_INSTANCE_THREAD
public static java.lang.String BUSINESSCLASSNAME
public static java.lang.String FASTMD5_LIBPATH
public static java.lang.String GETFILEFROMPATH_PATH
public static java.lang.String WEBOPENDU_PATH
public static java.lang.String WEBDF_PATH
public static java.lang.String RUNWEBLSDSERVER_PATH
public static java.lang.String RUNWEBLSDCHECK_PATH
public static java.lang.String SLF4J_PATH
public static final boolean ISUNIX
public static boolean ISWEB
public static final java.lang.String LSDSESSIONATTR
public static int typeDriver
public static final int typeMySQL
public static final int typeOracle
public static final int typePostgresql
public static boolean isSGBDLocal
public static final int MAXIMUM_FILELIST
public static final byte LSD_GET
public static final byte LSD_GETASYNC
public static final byte LSD_PUT
public static final byte LSD_PUTASYNC
public static final byte LSD_PUTFILE
public static final byte LSD_MOVE
public static final byte LSD_LEGMOVE
public static final byte LSD_SIZE
public static final byte LSD_EXIST
public static final byte LSD_COPY
public static final byte LSD_LIST
public static final byte LSD_LISTMD5
public static final byte LSD_AEXIST
public static final byte LSD_AEXISTMD5
public static final byte LSD_SESSIONINFO
public static final byte LSD_START
public static final byte LSD_STOP
public static final byte LSD_SHUTDOWN
public static final byte LSD_SHUTDOWNIMMEDIATE
public static final byte LSD_RESTART
public static final byte LSD_ENABLE
public static final byte LSD_DISABLE
public static final byte LSD_CREATEDIR
public static final byte LSD_WIPEDIR
public static final byte LSD_WIPERECURDIR
public static final byte LSD_DEL
public static final byte LSD_UNAVAILABLE
public static final byte LSD_NULL
public static final byte LSD_MSG_CONTINUE
public static final byte LSD_MSG_OK
public static final byte LSD_MSG_KOSYSTEM
public static final byte LSD_MSG_KOBADREQ
public static final byte LSD_MSG_KOUNAVAIL
public static final byte LSD_MSG_KONOPREVIOUS
public static final byte LSD_MSG_KOBADCLIENT
public static final byte LSD_MSG_KONOSERVICE
public static final int LSD_RKADMIN
public static final int LSD_RKUSER
public static final int LSD_RKCOMP
public static final int LSD_RKPROTECTED
public static ch.qos.logback.classic.Logger logger
public static final long invalide_idx
public static final long minimal_idx
public static final long maximal_idx
public static final char separator
public static final java.lang.String sseparator
Constructor Detail |
---|
public LSDConstants()
Method Detail |
---|
public static long computeSize(long size)
size
-
public static double[] getGlobalUsedFreeSpace(java.io.File storage)
storage
-
public static double[] getUsedSpace(java.io.File storage)
storage
-
public static double[] getUsedSpace(java.io.File storage, boolean useCFunc)
storage
- useCFunc
-
public static java.lang.String idUniqueTosubPath(long idUnique)
idUnique
-
public static void computeNbThreads()
public static boolean isIdUniqueKO(long idUnique)
idUnique
-
public static void initConfigLogger(java.lang.String file)
file
- public static void startLogger(java.lang.Class classtype)
classtype
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |