diff options
author | Don Anderson <dda@ddanderson.com> | 2014-10-30 09:26:49 -0400 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2014-10-30 09:26:49 -0400 |
commit | 61bbf08f000c2560c1adb21d3d6ad2243b35d0ae (patch) | |
tree | 24d019206033760eead9d88d55de8d4ef5fd6421 /lang/java | |
parent | c20b47ffb74300af4decca9e69994b0de0d93f3d (diff) | |
parent | e352a066afd607fb996d8a64fbb10c8e994dcc1b (diff) | |
download | mongo-61bbf08f000c2560c1adb21d3d6ad2243b35d0ae.tar.gz |
Merge branch 'develop' into java-exceptions
Diffstat (limited to 'lang/java')
-rw-r--r-- | lang/java/java_doc.i | 1 | ||||
-rw-r--r-- | lang/java/wiredtiger.i | 46 |
2 files changed, 35 insertions, 12 deletions
diff --git a/lang/java/java_doc.i b/lang/java/java_doc.i index 77181b841e5..31bad525330 100644 --- a/lang/java/java_doc.i +++ b/lang/java/java_doc.i @@ -41,6 +41,7 @@ COPYDOC(__wt_session, WT_SESSION, begin_transaction) COPYDOC(__wt_session, WT_SESSION, commit_transaction) COPYDOC(__wt_session, WT_SESSION, rollback_transaction) COPYDOC(__wt_session, WT_SESSION, checkpoint) +COPYDOC(__wt_session, WT_SESSION, transaction_pinned_range) COPYDOC(__wt_connection, WT_CONNECTION, async_flush) COPYDOC(__wt_connection, WT_CONNECTION, async_new_op) COPYDOC(__wt_connection, WT_CONNECTION, close) diff --git a/lang/java/wiredtiger.i b/lang/java/wiredtiger.i index 0e0a2bb12b1..28a0acd5d54 100644 --- a/lang/java/wiredtiger.i +++ b/lang/java/wiredtiger.i @@ -32,6 +32,7 @@ %include "enums.swg" %include "typemaps.i" +%include "stdint.i" %pragma(java) jniclasscode=%{ static { @@ -492,7 +493,7 @@ err: __wt_err(session, ret, "Java async callback error"); __wt_free(session, jcb); if (ret == 0 && (opret == 0 || opret == WT_NOTFOUND)) - return (0); + return (0); else return (1); } @@ -960,7 +961,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The status of the operation. */ public int insert() - throws WiredTigerException { + throws WiredTigerException { byte[] key = keyPacker.getValue(); byte[] value = valuePacker.getValue(); keyPacker.reset(); @@ -974,7 +975,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The status of the operation. */ public int update() - throws WiredTigerException { + throws WiredTigerException { byte[] key = keyPacker.getValue(); byte[] value = valuePacker.getValue(); keyPacker.reset(); @@ -988,7 +989,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The status of the operation. */ public int remove() - throws WiredTigerException { + throws WiredTigerException { byte[] key = keyPacker.getValue(); keyPacker.reset(); return remove_wrap(key); @@ -1000,7 +1001,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public int search() - throws WiredTigerException { + throws WiredTigerException { int ret = search_wrap(keyPacker.getValue()); keyPacker.reset(); valuePacker.reset(); @@ -1516,7 +1517,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The status of the operation. */ public int update() - throws WiredTigerException { + throws WiredTigerException { byte[] key = keyPacker.getValue(); byte[] value = valuePacker.getValue(); keyPacker.reset(); @@ -1530,7 +1531,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The status of the operation. */ public int remove() - throws WiredTigerException { + throws WiredTigerException { byte[] key = keyPacker.getValue(); keyPacker.reset(); return remove_wrap(key); @@ -1542,7 +1543,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public int compare(Cursor other) - throws WiredTigerException { + throws WiredTigerException { return compare_wrap(other); } @@ -1552,7 +1553,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public int next() - throws WiredTigerException { + throws WiredTigerException { int ret = next_wrap(); keyPacker.reset(); valuePacker.reset(); @@ -1569,7 +1570,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public int prev() - throws WiredTigerException { + throws WiredTigerException { int ret = prev_wrap(); keyPacker.reset(); valuePacker.reset(); @@ -1586,7 +1587,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public int search() - throws WiredTigerException { + throws WiredTigerException { int ret = search_wrap(keyPacker.getValue()); keyPacker.reset(); valuePacker.reset(); @@ -1603,7 +1604,7 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; * \return The result of the comparison. */ public SearchStatus search_near() - throws WiredTigerException { + throws WiredTigerException { SearchStatus ret = search_near_wrap(keyPacker.getValue()); keyPacker.reset(); valuePacker.reset(); @@ -1684,6 +1685,16 @@ WT_ASYNC_CALLBACK javaApiAsyncHandler = {javaAsyncHandler}; %ignore __wt_connection::open_session; %rename(open_session) __wt_connection::open_session_wrap; + +%ignore __wt_session::transaction_pinned_range; +%rename(transaction_pinned_range) __wt_session::transaction_pinned_range_wrap; +%javamethodmodifiers __wt_session::transaction_pinned_range_wrap " + /** + * @copydoc WT_SESSION::transaction_pinned_range + */ + public "; + +%rename(open_cursor) __wt_session::open_cursor_wrap; %ignore __wt_session::open_cursor; %javamethodmodifiers __wt_session::open_cursor_wrap " /** @@ -1835,3 +1846,14 @@ err: if (ret != 0) return cursor; } } + +%extend __wt_session { + long transaction_pinned_range_wrap(JNIEnv *jenv) { + int ret; + uint64_t range = 0; + ret = self->transaction_pinned_range(self, &range); +err: if (ret != 0) + throwWiredTigerException(jenv, wiredtiger_strerror(ret)); + return range; + } +} |