Commit Graph

83 Commits

Author SHA1 Message Date
Michael Cahill
1dae9366fd Merge branch 'develop' into cursor-equal
Conflicts:
	src/cursor/cur_std.c
	src/cursor/cur_table.c
	src/include/extern.h
2015-01-17 07:48:42 +11:00
Michael Cahill
a30db47d03 Merge branch 'develop' into cursor-equal
Conflicts:
	lang/python/wiredtiger.i
2015-01-17 07:33:37 +11:00
Keith Bostic
2894268cca Put the WT_CURSOR public methods in alphabetical order. 2015-01-16 15:01:36 -05:00
Michael Cahill
1b033e5b2b Don't allow "readonly" to be reconfigured on cursors.
refs #1467
2015-01-17 05:15:04 +11:00
Michael Cahill
eb1511f3f1 Merge branch 'develop' into cursor-reconfigure 2015-01-14 02:44:49 +11:00
Alex Gorrod
812be6c438 Rename WT_CURSOR compare_equal to be equals.
While here, add a generic cursor equals stub in curstd, rather than
redirecting via cursor function pointer lists.

Implement the Java API wrapper.
2015-01-14 02:28:10 +11:00
Keith Bostic
56865ca8ec Fix a function name typo, update auto-generated files. 2015-01-12 11:08:19 -05:00
Don Anderson
b8971b6ffe Merge branch 'develop' into java-examples 2015-01-09 10:19:17 -05:00
Don Anderson
c8bad02860 Various fixes related to java examples. Refs #1526.
Don't turn on cursor RAW flag for a JSON dump cursor.

Fixed unpacking a fixed length string: unpack cur position was not being updated.

Fixed packing a fixed length string: String array bounds check was firing.

Fixed unpacking short/int: range check was incorrect.

Added methods to put/get record numbers (e.g. getKeyRecord) in Cursor and AsyncOp.

Remove stray println.
2015-01-09 09:54:21 -05:00
Keith Bostic
1f9098871a Copyright notices: add MongoDB, update to 2015. 2015-01-04 14:07:56 -05:00
Keith Bostic
94b9c2774d Fix order of original cursor functions. 2014-12-22 16:43:46 -05:00
Keith Bostic
4c26d2324b Add support for a WT_CURSOR.reconfigure method, reference #1381. 2014-12-11 19:32:50 -05:00
Don Anderson
d3c8519c2a Add typemaps so Java close cleanups occur after 'close' completes. refs #1332.
Some refactoring and simplification of close code.
KNF whitespace.
2014-11-07 15:27:44 -05:00
Don Anderson
25028d5388 Added new %define to clean up name shuffling for wrap functions. #1295 2014-10-30 10:28:34 -04:00
Don Anderson
6880b1290d Cleanup as a result of last merge: refs #1295
Make new uint64 support work with WT_ASYNC_OP::get_id().
Removed unused label in WT_SESSION::transaction_pinned_range().
2014-10-30 10:04:48 -04:00
Don Anderson
61bbf08f00 Merge branch 'develop' into java-exceptions 2014-10-30 09:26:49 -04:00
Alex Gorrod
906f10a05b Fix copy-paste error. 2014-10-28 11:57:07 +11:00
Alex Gorrod
a3051990fe Add transaction_pinned_range to Java API. 2014-10-28 11:30:36 +11:00
Michael Cahill
f333e96644 Fix transaction ID logic (again), add session method entry / exit, add a documentation snippet. 2014-10-27 12:41:20 +11:00
Don Anderson
8dc722e1bd Added a minimal ExceptionTest for java. 2014-10-23 11:19:36 -04:00
Don Anderson
e2ebc73274 Integrate new Java exception classes into java version of doc. 2014-10-23 10:45:31 -04:00
Don Anderson
3d3c292797 Merge branch 'develop' into java-exceptions 2014-10-23 10:34:14 -04:00
Don Anderson
b7c182b26c Renamed WiredTigerDeadlockException to be WiredTigerRollbackException. 2014-10-23 10:33:19 -04:00
Michael Cahill
5c2c195438 Make sure the Java examples are built along with the API. Make section names language-specific to avoid errors from newer releases of doxygen. 2014-10-13 17:08:20 +11:00
Don Anderson
f2dd007eda Added new Java exception classes for WT_DEADLOCK and WT_PANIC errors.
refs #1011.
2014-10-10 13:45:41 -04:00
Don Anderson
dff61d2713 WiredTigerException now extends RuntimeException, making it easier to
write Java programs using WiredTiger.  refs #1011.
2014-10-10 13:37:25 -04:00
Don Anderson
84be8984da Multiple language doc support. refs #1130.
doxfilter modified to know about new macros: @m_page, @m_if, @m_else, @m_endif.
Pages with @m_page have all its snippets/subpages point to the language
specific example/subpage.

The java examples directory added to EXAMPLE_PATH in Doxyfile.

Added @m_page to any doc page that also needs a Java version.

Added cast to wiredtiger.i for stricter compiler checking.
2014-10-06 13:58:18 -04:00
Susan LoVerso
6f78c3d431 Ignore __wt_lsn in language interfaces. #1106 2014-07-15 15:49:55 -04:00
Susan LoVerso
af428ba90c Revert languages to using lang_private. 2014-05-28 11:02:10 -04:00
Alex Gorrod
c904ad189f Add an app_private field to the WT_ASYNC_OP handle. 2014-05-28 15:14:14 +10:00
Susan LoVerso
82bb27627b Expose the private field with a macro. 2014-05-27 13:07:06 -04:00
Don Anderson
3a3339d29f Added 'throws' clauses to Java method signatures for all wrapped
functions except getters.  refs #1011
2014-05-15 11:25:40 -04:00
Don Anderson
0fafbdd0c8 Fixes for Java async stability and performance.
Cache field ids and method ids for all async operations.  Invalidate
unpackers by setting fields, rather than calling a method to do it.

Use javaClose to invalidate the swigCptr for a AsyncOp at the end of
the callback.  Any use of an AsyncOp after its lifetime has ended will
give a NullPointerException.

Declare that new_async_op throws WiredTigerException, which happens
when there are no more slots available.

Added a test with a million items that typically does no pauses when
creating ops, but catches WiredTigerException and retries with a short
sleep.
2014-05-13 22:20:18 -04:00
Don Anderson
8893d57383 KNF fixes and comment typo.
Name async_new_op async_flush using underscore (not camelcase) convention.
2014-05-13 13:19:52 -04:00
Don Anderson
2bf916541f Support async operations in Java. refs #933.
- Created a real async handler for java allowing callbacks
  into java code.  Code to be registered must implement the
  new AsyncCallback interface.
- Renamed classes/methods to Java-ish names.
- Fixes to support 'this' removal for AsyncOp.
- Java's cursor ops, like 'insert' set up the value unpackers
  after insert completes.  For AsyncOp, we take a different
  approach, and invalidate the unpacker when the op completes,
  letting the value be fetched when needed.
- Added new test AsyncTest that tests doing different numbers of
  async ops with different parameters, and also with different types
  of keys/values.
2014-05-11 15:09:40 -04:00
Don Anderson
10b45b8a73 Python for async:
- Various fixes to allow test_async01.py to work for string key/value.
- Hand rolled AsyncCallback class to mirror C's WT_ASYNC_CALLBACK.
- Keep the async callback in the PY_CALLBACK struct hidden in cursor's
  lang_private.
- Some cleanups in writeToPythonStream(), including fixing
  potential race condition.

Java for async:
- Modified Java SWIG interfaces for async enough to allow it compile.
- Standardized class spelling to 'AsyncOp'.
- Removed a few non-applicable methods from AsyncOp.
2014-05-01 13:13:47 -04:00
Susan LoVerso
10d75f7130 Add asynchronous compact support to async API. 2014-04-28 15:23:36 -04:00
Susan LoVerso
cc7fdde5cc Add Java support for async ops. 2014-04-21 12:23:03 -04:00
Susan LoVerso
569be29173 Use an underlying cursor for async op keys/values. 2014-04-09 14:25:51 -04:00
Michael Cahill
5cba38f382 Merge branch 'develop' into async
Conflicts:
	src/include/extern.h
	src/include/wiredtiger.in
2014-04-07 15:39:23 +10:00
Alex Gorrod
c93b75875b Fix include paths for Java and Python builds.
This means that Java and Python builds work from the root
(or arbitrary) directories again.
2014-03-31 13:03:53 +11:00
Susan LoVerso
970b114fc6 Clean up pass for s_all. 2014-03-26 11:42:29 -04:00
Alex Gorrod
0983863e18 Configuration parser API, update documentation and examples. 2014-02-25 13:14:48 +11:00
Alex Gorrod
54b39fc72f Update the configuration parsing API. Not finalized, but a step closer. 2014-02-24 15:38:48 +11:00
Michael Cahill
8354efc8c9 Remove circular dependency from the Java build.
refs #841
2014-01-14 14:17:12 +11:00
Michael Cahill
0a9925e7e3 Add a rule to the Java Makefile that knows the path to wiredtiger_wrap.c.
refs #841
2014-01-13 14:21:49 +11:00
Michael Cahill
8c10616fb7 Fix the Java build for automake 1.14.
refs #841, #599
2014-01-13 11:18:05 +11:00
Keith Bostic
5b509b7220 Update copyright notices for 2014.
Move lang/java and lang/python into the public domain.
2014-01-07 10:30:12 -05:00
Don Anderson
f9e48c480e Fix errors that crash the Java VM when a cursor is explicitly closed.
The java test suite now passes cleanly.
refs #649
2013-12-28 10:16:01 -05:00
Don Anderson
29aaec0c9f Null out closed handles in Java, and detect nulled handles on use. refs #485.
As reported in #485, when a conn/session is closed, any subordinate
open cursors and sessions have dangling handles that refer to freed
memory.  But also, if a conn/session/cursor handle is closed, that
handle may still be referenced in Java though it references freed
memory.

This commit uses the event handler for close calls to capture the first
case, and makes explicit calls at the close site for the second case.
For each case, a close will set the Java side 'swigCPtr' for each associated
object being closed to 0.

For detection, typemaps effectively check an arg's swigCPtr to see
if the object has been previously closed.  Special cases, like when
a NULL handle is permitted in the API, are accounted for.

Some details:
  - WT_HANDLE_NULLABLE() and WT_HANDLE_CLOSED() mark points in the API
    (wiredtiger.in) where handles may be used as null and where
    handles are closed.  This are not exposed to doxygen.
  - lang_private fields have been added to WT_CONNECTION_IMPL,
    WT_SESSION_IMPL and WT_CURSOR to keep a handle to the
    associated java object, needed at the time of the close().
2013-11-18 13:29:15 -05:00