提交 9e771b50 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 723696ee
...@@ -18,10 +18,11 @@ Change Log ...@@ -18,10 +18,11 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>H2 Console: the session timeout can now be configured using the system property "h2.consoleTimeout". <ul><li>
</li><li>H2 Console: the session timeout can now be configured using the system property "h2.consoleTimeout".
</li><li>Issue 431: Improved compatibility with MySQL: support for </li><li>Issue 431: Improved compatibility with MySQL: support for
"ENGINE=InnoDB charset=UTF8" when creating a table. "ENGINE=InnoDB charset=UTF8" when creating a table.
</li><li>Issue 249: Improved compatiblity with MySQL in the MySQL mode: </li><li>Issue 249: Improved compatibility with MySQL in the MySQL mode:
now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL now the methods DatabaseMetaData methods stores*Case*Identifiers return the same as MySQL
when using the MySQL mode. when using the MySQL mode.
</li><li>Issue 434: H2 Console didn't work in the Chrome browser </li><li>Issue 434: H2 Console didn't work in the Chrome browser
......
...@@ -1234,6 +1234,12 @@ public class Session extends SessionWithState { ...@@ -1234,6 +1234,12 @@ public class Session extends SessionWithState {
return redoLogBinary; return redoLogBinary;
} }
/**
* Get the transaction to use for this session.
*
* @param store the store
* @return the transaction
*/
public Transaction getTransaction(TransactionStore store) { public Transaction getTransaction(TransactionStore store) {
if (transaction == null) { if (transaction == null) {
transaction = store.begin(); transaction = store.begin();
......
...@@ -28,7 +28,7 @@ public class TransactionStore { ...@@ -28,7 +28,7 @@ public class TransactionStore {
/** /**
* The persisted map of open transaction. * The persisted map of open transaction.
* Key: transactionId, value: [ status, nameÊ]. * Key: transactionId, value: [ status, name ].
*/ */
final MVMap<Long, Object[]> openTransactions; final MVMap<Long, Object[]> openTransactions;
...@@ -117,7 +117,7 @@ public class TransactionStore { ...@@ -117,7 +117,7 @@ public class TransactionStore {
* Close the transaction store. * Close the transaction store.
*/ */
public synchronized void close() { public synchronized void close() {
// to avoid losing transaction ids (so just cosmetic) // to avoid losing transaction ids
settings.put(LAST_TRANSACTION_ID, "" + lastTransactionId); settings.put(LAST_TRANSACTION_ID, "" + lastTransactionId);
store.commit(); store.commit();
} }
...@@ -720,6 +720,7 @@ public class TransactionStore { ...@@ -720,6 +720,7 @@ public class TransactionStore {
* Get the value for the given key. * Get the value for the given key.
* *
* @param key the key * @param key the key
* @param m the map
* @return the value or null * @return the value or null
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
...@@ -755,6 +756,15 @@ public class TransactionStore { ...@@ -755,6 +756,15 @@ public class TransactionStore {
} }
} }
/**
* Open the map to store the data.
*
* @param <A> the key type
* @param <B> the value type
* @param name the map name
* @param builder the builder
* @return the map
*/
public <A, B> MVMap<A, B> openMap(String name, Builder<A, B> builder) { public <A, B> MVMap<A, B> openMap(String name, Builder<A, B> builder) {
int todo; int todo;
return store.openMap(name, builder); return store.openMap(name, builder);
......
...@@ -323,6 +323,12 @@ public class MVPrimaryIndex extends BaseIndex { ...@@ -323,6 +323,12 @@ public class MVPrimaryIndex extends BaseIndex {
return true; return true;
} }
/**
* Get the map to store the data.
*
* @param session the session
* @return the map
*/
MVMap<Long, Value[]> getMap(Session session) { MVMap<Long, Value[]> getMap(Session session) {
// return mvTable.getTransaction(session).openMap(name) // return mvTable.getTransaction(session).openMap(name)
return map; return map;
......
...@@ -296,6 +296,12 @@ public class MVSecondaryIndex extends BaseIndex { ...@@ -296,6 +296,12 @@ public class MVSecondaryIndex extends BaseIndex {
} }
/**
* Get the map to store the data.
*
* @param session the session
* @return the map
*/
MVMap<Value[], Long> getMap(Session session) { MVMap<Value[], Long> getMap(Session session) {
return map2; return map2;
} }
......
...@@ -673,6 +673,12 @@ public class MVTable extends TableBase { ...@@ -673,6 +673,12 @@ public class MVTable extends TableBase {
// ok // ok
} }
/**
* Get the transaction to use for this session.
*
* @param session the session
* @return the transaction
*/
Transaction getTransaction(Session session) { Transaction getTransaction(Session session) {
return session.getTransaction(store); return session.getTransaction(store);
} }
......
...@@ -723,4 +723,5 @@ versioning sector survives goes ssd ambiguity sizing perspective jumps ...@@ -723,4 +723,5 @@ versioning sector survives goes ssd ambiguity sizing perspective jumps
incompressible distinguished factories throughput vectors tripodi cracking incompressible distinguished factories throughput vectors tripodi cracking
brown tweak pbkdf sharding ieee galois otterstrom sharded hruda argaul gaul brown tweak pbkdf sharding ieee galois otterstrom sharded hruda argaul gaul
simo unpredictable overtakes conditionally decreases warned coupled spin simo unpredictable overtakes conditionally decreases warned coupled spin
unsynchronized reality cores effort slice addleman koskela ville blocking seen unsynchronized reality cores effort slice addleman koskela ville blocking seen
\ No newline at end of file isam
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论