summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
Commit message (Collapse)AuthorAgeFilesLines
* * src/qpid/sys/Serializer.h, .cpp:Alan Conway2007-08-212-91/+110
| | | | | | | | | | | Template Serializer on functor for execute(). Old Serializer equivalent to Serializer<boost::function<void()> > * src/qpid/broker/BrokerQueue.h, .cpp: Use hand-written functor for Serializer instead of boost::function. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568332 13f79535-47bb-0310-9956-ffa450edef68
* AMQBodies are no longer allocated on the heap and passed with shared_ptr.Alan Conway2007-08-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | AMQFrame contains a boost::variant of AMQHeaderBody,AMQContentBody, AMQHeatbeatBody, and MethodHolder. A variant is basically a type-safe union, it can allocate any of the types in-place. MethodHolder contains a Blob, a less sophisticated kind of variant, which can contain any of the concrete method body types. Using variants for all the method types causes outrageous compile times and bloated library symbol names. Blob lacks some of the finer features of variant and needs help from generated code. For now both are hidden to the rest of the code base behind AMQFrame and MethodBody classes so if/when we decide to settle on just one "variant" type solution we can do so. This commit touches nearly 100 files, mostly converting method signatures with shared_ptr<FooBody> to FooBody* or FooBody&, and converting stored shared_ptr<AMQBody> to AMQFrame and share_ptr<AMQMethodBody> to MethodHolder. There is one outstanding client memory leak, which I will fix in my next commit. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566822 13f79535-47bb-0310-9956-ffa450edef68
* r948@fuschia: andrew | 2007-08-09 18:46:30 +0100Andrew Stitcher2007-08-092-5/+5
| | | | | | | | | | | | | | | | | | | | | r913@fuschia: andrew | 2007-08-07 12:56:10 +0100 Removed extraneous parameter when creating Broker Acceptor r949@fuschia: andrew | 2007-08-09 18:46:30 +0100 r914@fuschia: andrew | 2007-08-07 12:56:55 +0100 Work in Progress: making the client library use the AsynchIO layer r950@fuschia: andrew | 2007-08-09 18:46:30 +0100 r937@fuschia: andrew | 2007-08-09 02:29:41 +0100 Shutdown connection properly r951@fuschia: andrew | 2007-08-09 18:46:31 +0100 r952@fuschia: andrew | 2007-08-09 19:27:03 +0100 Finishing touches to first cut of AsynchIO for client git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564333 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/start_broker: Pass script parameters to broker.Alan Conway2007-08-082-6/+5
| | | | | | | | | | | | | * src/qpid/sys/Serializer.cpp: Corrected log levels. * src/tests/.valgrind.supp-default: Suppress probably benign leaks and uninit param errors from asynch IO code. Need verification they are beningn. * src/qpid/sys/AsynchIOAcceptor.cpp(run): Fix memory leak. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@563879 13f79535-47bb-0310-9956-ffa450edef68
* * Changed Broker queue processing to avoid unnecessary uses of boost::bindAndrew Stitcher2007-08-022-2/+2
| | | | | | | * Changed Serializer::execute to take Tasks by reference to avoid overhead of copying git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562179 13f79535-47bb-0310-9956-ffa450edef68
* Recoded writing code so that it doesn't allocate framing::Buffer on the heapAndrew Stitcher2007-08-011-33/+27
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@561877 13f79535-47bb-0310-9956-ffa450edef68
* * Fix crash on shutdown due to underlying poller being shutdown twiceAndrew Stitcher2007-07-311-0/+4
| | | | | | | - Actually just made the poller ignore subsequent shutdown attempts git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@561279 13f79535-47bb-0310-9956-ffa450edef68
* r797@fuschia: andrew | 2007-07-30 14:25:02 +0100Andrew Stitcher2007-07-307-813/+0
| | | | | | | | * Removed all the leader-follower acceptor code (APR based acceptor) * Removed the --enable/disable-apr-netio option to configure git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@560973 13f79535-47bb-0310-9956-ffa450edef68
* * Asynchronous network IO subsystemAndrew Stitcher2007-07-2723-1852/+681
| | | | | | | | | | | | | | | | | | - This is now implemented such that it very nearly only depends on the platform code (Socker & Poller), this is not 100% true at present, but should be simple to finish. - This is still not the default (use "./configure --disable-apr-netio" to get it) - Interrupting the broker gives a known error - Default for number of broker io threads is not correct (needs to be number of CPUs - it will run slower with too many io threads) * EventChannel code - Deleted all EventChannel code as it's entirely superceded by this new shiny code ;-) * Rearranged the platform Socket implementations a bit for better abstraction git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@560323 13f79535-47bb-0310-9956-ffa450edef68
* * README: Instructions for openais install.Alan Conway2007-07-264-407/+50
| | | | | | | | | | | | | | * configure.ac: Enable clustering if suitable openais is present. * src/tests/Cluster.cpp, .h, Cluster_child: Updated for 0-10 * src/qpid/sys/ConcurrentQueue.h: Added waitPop() * src/Makefile.am, src/qpid/sys/ThreadSafeQueue.h, ProducerConsumer.h: Removed unused code, ConcurrentQueue provides same functionality. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@559859 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/cluster.mk: Enable cluster test.Alan Conway2007-07-231-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | * src/tests/Cluster.h (class TestHandler): Fixed race in TestHandler::waitFor * src/tests/Cluster.cpp - Allow separate start of parent and child processes. * src/qpid/Options.cpp (parse): Skip argv parsing if argc=0. * src/qpid/cluster/Cluster.cpp (configChange): assert group name. * src/qpid/cluster/Cpg.cpp, .h: Additional logging * src/qpid/framing/AMQFrame.cpp: Initialize all fields in ctor, avoid valgrind warning. * src/qpid/log/Logger.cpp: Initialize singleton automatically from environment so logging can be used on tests. * src/qpid/sys/Time.h: Avoid overflow in AbsTime(t, TIME_INFINITE) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@558710 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/sys/Serializer.h: Serialize calls to a function,Alan Conway2007-07-164-15/+245
| | | | | | | | | by queueing and dispatching in a separate thread if necessary. * src/qpid/sys/*/Mutex.h: trylock to return a bool. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556679 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/sys/ConcurrentQueue.h: Thread-safe queue with atomic pop()Alan Conway2007-07-131-0/+67
| | | | | | | | | | | | | | * src/tests/ConcurrentQueue.cpp: Experimental code to compare a dual-vector, dual-lock implementation with a simple locked deque. Results indicate the more complex design does not perform any better, so ConcurrentQueue.h uses the simpler design. Not part of default test harness, run by hand to see results. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556045 13f79535-47bb-0310-9956-ffa450edef68
* * Add libuuid to libcommon link (for when apr goes away)Andrew Stitcher2007-07-126-123/+430
| | | | | | | | * Latest version of AsynchIO code git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@555455 13f79535-47bb-0310-9956-ffa450edef68
* - missing APR mutex update - should now all build againCarl C. Trieloff2007-07-051-0/+52
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553576 13f79535-47bb-0310-9956-ffa450edef68
* - Added RW lockCarl C. Trieloff2007-07-052-5/+99
| | | | | | | | | | | - Updated all exchanges to us RW lock - Updated all registries to us RW lock - Still need to do (client, channel, message and queues) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553549 13f79535-47bb-0310-9956-ffa450edef68
* 2007-07-02 <aconway@redhat.comAlan Conway2007-07-047-250/+257
| | | | | | | | | | | | | | | | * qpid/sys/Shlib.h, .cpp: Portable shared library abstraction. - Shlib: load, unload, getSymbol - AutoShlib: unload in destructor. * qpid/sys/apr/Shlib.cpp sys/posix/Shlib.cpp: APR/Posix impls * qpid/sys/Module.h: Reimplemented Module in terms of AutoShlib. * qpid/Plugin.cpp, .h: Removed dlopen - use Shlib instead. * qpid/broker/Broker.cpp: Added missing #include "qpid/log/Statement.h" * tests/Shlib.cpp, shlibtest.cpp: Unit test git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553056 13f79535-47bb-0310-9956-ffa450edef68
* Small fixes to enable the --disable-apr-platform build to carry on compilingAndrew Stitcher2007-07-021-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552535 13f79535-47bb-0310-9956-ffa450edef68
* * More work on asychronous network IOAndrew Stitcher2007-06-296-43/+502
| | | | | | | * Fix of current EventQueue code to carry on compiling git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552001 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/ChannelAdapter.cpp: Use handler chainsAlan Conway2007-06-272-10/+9
| | | | | | | | | | | | | | | | | | | for in and outbound frames. * src/qpid/framing/InputHandler.h, OutputHandler.h, FrameHandler.h: All handlers pass AMQFrame& and have consistent memory management. Terminal OutputHandlers used to take ownership and delete frame, now they make a shallow copy instead. * src/qpid/framing/Handler.h, FrameHandler.h: Simplified. * src/qpid/client/ClientConnection.cpp: * src/qpid/broker/Connection.cpp: * src/qpid/broker/BrokerChannel.cpp: Update for ChannelAdapter changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551336 13f79535-47bb-0310-9956-ffa450edef68
* Fixed missing POSIX implementation of Acceptor::getHostAndrew Stitcher2007-06-273-28/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551327 13f79535-47bb-0310-9956-ffa450edef68
* 2007-06-25 <aconway@redhat.com>Alan Conway2007-06-265-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cluster class implementing cluster membership map. * src/qpid/cluster/Cluster.cpp: Cluster membership implementation. * src/qpid/cluster/Cpg.cpp: Support for boost::function callbacks. * src/tests/Url.cpp: Implements AMQP-95 URL format. * xml/cluster.xml: Cluster join method. Build/packaging * README: Remove mention of openais till clustering is functional. For now it is optional and we depend on an unpackaged version. * configure.ac: Check openais has cpg_local_get(). * Makefile.am: Added cluster.xml to EXTRA_DIST. * src/generate.sh: add cluster.xml to codegen. * src/tests/Makefile.am: - Generate individual "sudo -u ais" wrappers for openais tests. - Drop "unit" directory, all unit tests in "tests" directory Minor changes: * src/qpid/sys/posix/Socket.cpp: * src/qpid/sys/posix/PosixAcceptor.cpp: * src/qpid/sys/posix/EventChannelAcceptor.cpp: * src/qpid/sys/apr/APRAcceptor.cpp: * src/qpid/sys/Acceptor.h (getHost): Added getHost() * src/tests/.valgrind.supp-default: Suppress benign valgrind warning in libcpg. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550658 13f79535-47bb-0310-9956-ffa450edef68
* Intermediate checkin with preliminary work on epoll based net IOAndrew Stitcher2007-06-1814-355/+1234
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@548337 13f79535-47bb-0310-9956-ffa450edef68
* Fixed catch clauses to catch by const & and use std::exception forAlan Conway2007-06-141-1/+1
| | | | | | | "generic" catches. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547241 13f79535-47bb-0310-9956-ffa450edef68
* Timeout handling for dtx, plus tests.Gordon Sim2007-06-081-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@545531 13f79535-47bb-0310-9956-ffa450edef68
* Updates to dtx support.Gordon Sim2007-05-311-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@543182 13f79535-47bb-0310-9956-ffa450edef68
* Logging infrastructure: See qpidd --long-help for details.Alan Conway2007-05-3014-45/+51
| | | | | | | | | | | | | | | | | * src/qpid/log/*: Logging infrastructure, QPID_LOG macro. * src/*: changed output to cout/cerr to logging. * src/qpidd.cpp: logging options. * src/tests/Makefile.am: fixed issues with valgrind * src/tests/kill|start_broker: use broker daemon options. * src/tests/run_test: run tests in valgrind. Disabled till leaks in client_test are fixed. * src/test/unit/logging.cpp: Logging unit test using boost test framework. Eventually we should move all unit tests to boost & drop CppUnit. * src/test/unit/test_tools.h: useful extensions to boost framework: Regular expression check, ostream << for vectors. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@542855 13f79535-47bb-0310-9956-ffa450edef68
* * Split apart platform (threading etc.) from network ioAndrew Stitcher2007-05-2231-589/+1140
| | | | | | | | | | | you can now use a posix platform implementation by configuring --disable-apr-platform * Changed Time classes to distinguish between absolute times (AbsTime) and durations (Duration). This should avoid bugs caused by confusing the two types of time. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@540608 13f79535-47bb-0310-9956-ffa450edef68
* * Make APR/"posix" configurable using --disable-aprAndrew Stitcher2007-04-261-1/+1
| | | | | | | | * Make "posix" code build (but not run correctly) * By default still build APR version, which works as before git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@532543 13f79535-47bb-0310-9956-ffa450edef68
* Moved src/ source code to src/qpid directory:Alan Conway2007-04-1346-0/+4390
| | | | | | | | | | | - allows rhm package to build consistently against checked-out or installed qpid. - consistent correspondence between source paths and C++ namespaces. - consistent use of #include <qpid/foo> in source and by users. - allows header files to split over multiple directories, e.g. separating generated code, separating public API from private files. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@528668 13f79535-47bb-0310-9956-ffa450edef68
* 2006-12-01 Jim Meyering <meyering@redhat.com>Alan Conway2006-12-0118-1271/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This delta imposes two major changes on the C++ hierarchy: - adds autoconf, automake, libtool support - makes the hierarchy flatter and renames a few files (e.g., Queue.h, Queue.cpp) that appeared twice, once under client/ and again under broker/. In the process, I've changed many #include directives, mostly to remove a qpid/ or qpid/framing/ prefix from the file name argument. Although most changes were to .cpp and .h files under qpid/cpp/, there were also several to template files under qpid/gentools, and even one to CppGenerator.java. Nearly all files are moved to a new position in the hierarchy. The new hierarchy looks like this: src # this is the new home of qpidd.cpp tests # all tests are here. See Makefile.am. gen # As before, all generated files go here. lib # This is just a container for the 3 lib dirs: lib/client lib/broker lib/common lib/common/framing lib/common/sys lib/common/sys/posix lib/common/sys/apr build-aux m4 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@481159 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr-1 header includes.Alan Conway2006-11-292-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480657 13f79535-47bb-0310-9956-ffa450edef68
* Posix EventChannel implementation using epoll. Placeholder for kevents.Alan Conway2006-11-2910-432/+391
| | | | | | | | Dynamic thread pool EventChannelThreads to serve EventChannel. Misc cleanup/enhancements. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480582 13f79535-47bb-0310-9956-ffa450edef68
* Patch from Andrew Stitcher to fix APR #include using apr-config.Alan Conway2006-11-176-8/+8
| | | | | | | Fixed build problems with USE_APR= - builds OK but broker non-functional. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@476303 13f79535-47bb-0310-9956-ffa450edef68
* Re-enabled tracing of requests sent and received.Gordon Sim2006-11-151-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@475266 13f79535-47bb-0310-9956-ffa450edef68
* Added ability for broker to load a message store implementation from a library.Gordon Sim2006-11-151-0/+161
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@475181 13f79535-47bb-0310-9956-ffa450edef68
* EventChannel classes, start of epoll-based posix implementation.Alan Conway2006-11-135-16/+303
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@474452 13f79535-47bb-0310-9956-ffa450edef68
* update Apache licenses to the current versionStephen Vinoski2006-11-1013-169/+208
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@473568 13f79535-47bb-0310-9956-ffa450edef68
* Added POSIX equivalents to APR classes used by clients, inlined trivial calls.Alan Conway2006-11-0910-56/+449
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@473087 13f79535-47bb-0310-9956-ffa450edef68
* More separation of concerns with APR, client side complete.Alan Conway2006-11-092-8/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472732 13f79535-47bb-0310-9956-ffa450edef68
* Files missed in last commit.Alan Conway2006-11-083-0/+76
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472557 13f79535-47bb-0310-9956-ffa450edef68
* More reorg to separate APR/posix code, work in progress.Alan Conway2006-11-0824-1715/+29
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472545 13f79535-47bb-0310-9956-ffa450edef68
* Minor source reorg, see README.Alan Conway2006-11-0630-0/+2040
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@471789 13f79535-47bb-0310-9956-ffa450edef68