Library classes and tests have been moved to the proper package and directory structure, and references to com.facebook.thrift where replaced with org.apache.thrift throughout the code. The fb303 contrib project still contains com.facebook packages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734855 13f79535-47bb-0310-9956-ffa450edef68
This is a wire-compatible but non-source-compatible change.
When initializing structures, you must use
Foo(bar=1, baz="qux")
Foo(**{"bar": 1, "baz": "qux"})
instead of
Foo({"bar": 1, "baz": "qux"})
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734536 13f79535-47bb-0310-9956-ffa450edef68
Compiler:
- Thrift structures are serializable.
- The member fields of thrift structures are now private and only accessible
through Properties, which keep the appropriate __isset up to date.
Library
- Addition of TBufferedTransport, which can be used to wrap other Transports.
- Addition of TThreadedServer, which manually manages threads instead of
relying on .NET ThreadPool.
- Servers use a log delegate that defaults to System.Console but allows
servers to use log4net without introducing the dependency.
ThriftTest Visual Studio Project
- Test client and server that use ThriftTest.thrift. The project references
thrift.exe and Thrift.dll from the subversion tree and automatically builds
generated code. This makes it very easy to test changes in both the compiler
and library.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@732079 13f79535-47bb-0310-9956-ffa450edef68
On Ubuntu 8.10, /bin/sh is a symlink to dash (a minimal
Bourne-compatible shell). ./configure is smart enough
to detect when the shell it is run with is missing features.
In such cases, it switches to a more capable shell (like bash).
This causes it to enable certain shell constructs that are
not supported by dash. However, the Autoconf macro file that
we use to detect Java support interacts poorly with Autoconf
because it uses divert(-1) for large comments. This somehow
causes configure to set SHELL to /bin/sh. As a result, the
libtool script generated during the build process is not
compatible with the shell that is used to run it (if a recent
version of libtool is in use).
This change replaces all of the "divert(-1)" comments
with more traditional "dnl" comments. This allows Thrift
to build on Ubuntu 8.10.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@728756 13f79535-47bb-0310-9956-ffa450edef68
Java generates a warning when converting from an integer constant
to a byte or short without an explicit cast. This change adds a
cast to byte and short literals in Java.
Both Java and C++ fail to compile integer literals larger than 2^31
unless they are decorated with "L" (for Java) or "LL" (for g++).
This change adds the appropriate decorations.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@727130 13f79535-47bb-0310-9956-ffa450edef68
Adds syntax for attaching arbitrary key/value pairs to types.
These annotations can be accessed by individual generators to alter
the code they produce.
This version supports annotations on container types and structures.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@724954 13f79535-47bb-0310-9956-ffa450edef68
id_t is defined in some OSX header, and the id_t in this function
resolved to that one instead of Thread::id_t. This change fully
qualifies the type to make sure it resolves properly.
Also remove a comment about eliminating the C-style cast, since it
is actually quite appropriate in this case.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722337 13f79535-47bb-0310-9956-ffa450edef68
- Create a copy constructor for every Thrift struct. The constructor
performs a deep copy on the argument, resulting in no shared state.
- Make thrift structions implement Cloneable and implement .clone()
using the copy constructor.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722332 13f79535-47bb-0310-9956-ffa450edef68
This change makes it possible to set a maximum amount of memory that
TNonblockingServer will use for all read buffers (combined).
If it is exceeded, no new data will be read from clients until
memory is freed. The current implementation does a busy wait in
the main thread when this happens.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719741 13f79535-47bb-0310-9956-ffa450edef68
- On reading, behave the same way as the C++ code:
throw an exception if a required field is missing.
- In addition, throw an exception if a required field is missing
when writing. For the JavaBeans code, this means that __isset
is false (because it is maintained automatically). For non-beans
code, this means that the field is null. Non-nullable fields are
not checked in non-beans code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@719727 13f79535-47bb-0310-9956-ffa450edef68
This TNonblockingServer is very similar to the C++ implementation.
It assumes the framed transport, but it uses select instead of libevent.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712306 13f79535-47bb-0310-9956-ffa450edef68
Previously, TBufferedTransport and TFramedTransport could
leave data in their buffers if a flush threw an exception.
This patch makes them reset their internal pointers before
flushing to the underlying transport.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709037 13f79535-47bb-0310-9956-ffa450edef68