public class SysProperties extends Object
System properties can be set when starting the virtual machine:
java -Dh2.baseDir=/tempThey can be set within the application, but this must be done before loading any classes of this database (before loading the JDBC driver):
System.setProperty("h2.baseDir", "/temp");
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ALLOWED_CLASSES
System property
h2.allowedClasses (default: *). |
static String |
BIND_ADDRESS
System property
h2.bindAddress (default: null). |
static String |
BROWSER
System property
h2.browser (default: null). |
static boolean |
CHECK
System property
h2.check (default: true). |
static boolean |
CHECK2
System property
h2.check2 (default: false). |
static String |
CLIENT_TRACE_DIRECTORY
System property
h2.clientTraceDirectory (default:
trace.db/). |
static int |
COLLATOR_CACHE_SIZE
System property
h2.collatorCacheSize (default: 32000). |
static int |
CONSOLE_MAX_PROCEDURES_LIST_COLUMNS
System property
h2.consoleProcedureColumns
(default: 500). |
static int |
CONSOLE_MAX_TABLES_LIST_COLUMNS
System property
h2.consoleTableColumns
(default: 500). |
static int |
CONSOLE_MAX_TABLES_LIST_INDEXES
System property
h2.consoleTableIndexes
(default: 100). |
static boolean |
CONSOLE_STREAM
System property
h2.consoleStream (default: true). |
static int |
CONSOLE_TIMEOUT
System property
h2.consoleTimeout (default: 1800000). |
static int |
DATASOURCE_TRACE_LEVEL
System property
h2.dataSourceTraceLevel (default: 1). |
static int |
DELAY_WRONG_PASSWORD_MAX
System property
h2.delayWrongPasswordMax
(default: 4000). |
static int |
DELAY_WRONG_PASSWORD_MIN
System property
h2.delayWrongPasswordMin
(default: 250). |
static boolean |
ENABLE_ANONYMOUS_TLS
System property
h2.enableAnonymousTLS (default: true). |
static String |
FILE_ENCODING
System property
file.encoding (default: Cp1252). |
static String |
FILE_SEPARATOR
System property
file.separator (default: /). |
static String |
H2_BROWSER
INTERNAL
|
static String |
H2_SCRIPT_DIRECTORY
INTERNAL
|
static boolean |
IMPLICIT_RELATIVE_PATH
System property
h2.implicitRelativePath
(default: true for version 1.3, false for version 1.4). |
static String |
JAVA_OBJECT_SERIALIZER
System property
h2.javaObjectSerializer
(default: null). |
static String |
JAVA_SPECIFICATION_VERSION
System property
java.specification.version. |
static boolean |
JAVA_SYSTEM_COMPILER
System property
h2.javaSystemCompiler (default: true). |
static String |
LINE_SEPARATOR
System property
line.separator (default: \n). |
static int |
LOB_CLIENT_MAX_SIZE_MEMORY
System property
h2.lobClientMaxSizeMemory (default:
1048576). |
static int |
LOB_FILES_PER_DIRECTORY
System property
h2.lobFilesPerDirectory
(default: 256). |
static boolean |
lobCloseBetweenReads
System property
h2.lobCloseBetweenReads
(default: false). |
static int |
MAX_FILE_RETRY
System property
h2.maxFileRetry (default: 16). |
static int |
MAX_MEMORY_ROWS
System property
h2.maxMemoryRows
(default: 40000 per GB of available RAM). |
static int |
MAX_RECONNECT
System property
h2.maxReconnect (default: 3). |
static long |
MAX_TRACE_DATA_LENGTH
System property
h2.maxTraceDataLength
(default: 65535). |
static boolean |
MODIFY_ON_WRITE
System property
h2.modifyOnWrite (default: false). |
static boolean |
NIO_CLEANER_HACK
System property
h2.nioCleanerHack (default: false). |
static boolean |
NIO_LOAD_MAPPED
System property
h2.nioLoadMapped (default: false). |
static boolean |
OBJECT_CACHE
System property
h2.objectCache (default: true). |
static int |
OBJECT_CACHE_MAX_PER_ELEMENT_SIZE
System property
h2.objectCacheMaxPerElementSize (default:
4096). |
static int |
OBJECT_CACHE_SIZE
System property
h2.objectCacheSize (default: 1024). |
static boolean |
OLD_STYLE_OUTER_JOIN
System property
h2.oldStyleOuterJoin
(default: true for version 1.3, false for version 1.4). |
static String |
PG_DEFAULT_CLIENT_ENCODING
System property
h2.pgClientEncoding (default: UTF-8). |
static String |
PREFIX_TEMP_FILE
System property
h2.prefixTempFile (default: h2.temp). |
static boolean |
serializeJavaObject
System property
h2.serializeJavaObject
(default: true). |
static int |
SERVER_CACHED_OBJECTS
System property
h2.serverCachedObjects (default: 64). |
static int |
SERVER_RESULT_SET_FETCH_SIZE
System property
h2.serverResultSetFetchSize
(default: 100). |
static int |
SOCKET_CONNECT_RETRY
System property
h2.socketConnectRetry (default: 16). |
static int |
SOCKET_CONNECT_TIMEOUT
System property
h2.socketConnectTimeout
(default: 2000). |
static boolean |
SORT_BINARY_UNSIGNED
System property
h2.sortBinaryUnsigned
(default: false with version 1.3, true with version 1.4). |
static boolean |
SORT_NULLS_HIGH
System property
h2.sortNullsHigh (default: false). |
static long |
SPLIT_FILE_SIZE_SHIFT
System property
h2.splitFileSizeShift (default: 30). |
static String |
SYNC_METHOD
System property
h2.syncMethod (default: sync). |
static boolean |
THREAD_DEADLOCK_DETECTOR
System property
h2.threadDeadlockDetector
(default: false). |
static boolean |
TRACE_IO
System property
h2.traceIO (default: false). |
static String |
URL_MAP
System property
h2.urlMap (default: null). |
static boolean |
USE_THREAD_CONTEXT_CLASS_LOADER
System property
h2.useThreadContextClassLoader
(default: false). |
static String |
USER_HOME
System property
user.home (empty string if not set). |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getBaseDir()
INTERNAL
|
static String |
getScriptDirectory()
System property
h2.scriptDirectory (default: empty
string). |
static void |
setBaseDir(String dir)
INTERNAL
|
public static final String FILE_ENCODING
file.encoding (default: Cp1252).public static final String FILE_SEPARATOR
file.separator (default: /).public static final String JAVA_SPECIFICATION_VERSION
java.specification.version.public static final String LINE_SEPARATOR
line.separator (default: \n).public static final String USER_HOME
user.home (empty string if not set).public static final String ALLOWED_CLASSES
h2.allowedClasses (default: *).public static final String BROWSER
h2.browser (default: null).java -Dh2.browser="open,-a,Safari,%url" ....public static final boolean ENABLE_ANONYMOUS_TLS
h2.enableAnonymousTLS (default: true).public static final String BIND_ADDRESS
h2.bindAddress (default: null).public static final boolean CHECK
h2.check (default: true).public static final boolean CHECK2
h2.check2 (default: false).public static final String CLIENT_TRACE_DIRECTORY
h2.clientTraceDirectory (default:
trace.db/).public static final int COLLATOR_CACHE_SIZE
h2.collatorCacheSize (default: 32000).public static final int CONSOLE_MAX_TABLES_LIST_INDEXES
h2.consoleTableIndexes
(default: 100).public static final int CONSOLE_MAX_TABLES_LIST_COLUMNS
h2.consoleTableColumns
(default: 500).public static final int CONSOLE_MAX_PROCEDURES_LIST_COLUMNS
h2.consoleProcedureColumns
(default: 500).public static final boolean CONSOLE_STREAM
h2.consoleStream (default: true).public static final int CONSOLE_TIMEOUT
h2.consoleTimeout (default: 1800000).public static final int DATASOURCE_TRACE_LEVEL
h2.dataSourceTraceLevel (default: 1).public static final int DELAY_WRONG_PASSWORD_MIN
h2.delayWrongPasswordMin
(default: 250).public static final int DELAY_WRONG_PASSWORD_MAX
h2.delayWrongPasswordMax
(default: 4000).public static final boolean JAVA_SYSTEM_COMPILER
h2.javaSystemCompiler (default: true).public static boolean lobCloseBetweenReads
h2.lobCloseBetweenReads
(default: false).public static final int LOB_FILES_PER_DIRECTORY
h2.lobFilesPerDirectory
(default: 256).public static final int LOB_CLIENT_MAX_SIZE_MEMORY
h2.lobClientMaxSizeMemory (default:
1048576).public static final int MAX_FILE_RETRY
h2.maxFileRetry (default: 16).public static final int MAX_RECONNECT
h2.maxReconnect (default: 3).public static final int MAX_MEMORY_ROWS
h2.maxMemoryRows
(default: 40000 per GB of available RAM).public static final long MAX_TRACE_DATA_LENGTH
h2.maxTraceDataLength
(default: 65535).public static final boolean MODIFY_ON_WRITE
h2.modifyOnWrite (default: false).public static final boolean NIO_LOAD_MAPPED
h2.nioLoadMapped (default: false).public static final boolean NIO_CLEANER_HACK
h2.nioCleanerHack (default: false).public static final boolean OBJECT_CACHE
h2.objectCache (default: true).public static final int OBJECT_CACHE_MAX_PER_ELEMENT_SIZE
h2.objectCacheMaxPerElementSize (default:
4096).public static final int OBJECT_CACHE_SIZE
h2.objectCacheSize (default: 1024).public static final boolean OLD_STYLE_OUTER_JOIN
h2.oldStyleOuterJoin
(default: true for version 1.3, false for version 1.4).public static final String PG_DEFAULT_CLIENT_ENCODING
h2.pgClientEncoding (default: UTF-8).public static final String PREFIX_TEMP_FILE
h2.prefixTempFile (default: h2.temp).public static final int SERVER_CACHED_OBJECTS
h2.serverCachedObjects (default: 64).public static final int SERVER_RESULT_SET_FETCH_SIZE
h2.serverResultSetFetchSize
(default: 100).public static final int SOCKET_CONNECT_RETRY
h2.socketConnectRetry (default: 16).public static final int SOCKET_CONNECT_TIMEOUT
h2.socketConnectTimeout
(default: 2000).public static final boolean SORT_BINARY_UNSIGNED
h2.sortBinaryUnsigned
(default: false with version 1.3, true with version 1.4).public static final boolean SORT_NULLS_HIGH
h2.sortNullsHigh (default: false).public static final long SPLIT_FILE_SIZE_SHIFT
h2.splitFileSizeShift (default: 30).public static final String SYNC_METHOD
h2.syncMethod (default: sync).public static final boolean TRACE_IO
h2.traceIO (default: false).public static final boolean THREAD_DEADLOCK_DETECTOR
h2.threadDeadlockDetector
(default: false).public static final boolean IMPLICIT_RELATIVE_PATH
h2.implicitRelativePath
(default: true for version 1.3, false for version 1.4).public static final String URL_MAP
h2.urlMap (default: null).public static final boolean USE_THREAD_CONTEXT_CLASS_LOADER
h2.useThreadContextClassLoader
(default: false).public static boolean serializeJavaObject
h2.serializeJavaObject
(default: true).public static final String JAVA_OBJECT_SERIALIZER
h2.javaObjectSerializer
(default: null).public static void setBaseDir(String dir)
public static String getBaseDir()
public static String getScriptDirectory()
h2.scriptDirectory (default: empty
string).Copyright © 2017. All rights reserved.