summaryrefslogtreecommitdiff
path: root/src/pipe.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-03-24 12:27:06 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-03-24 12:27:06 +0100
commit8463b4d55e45ea29d5a23f867e7f1c0077279ee7 (patch)
tree2c728398c1a8e7bd9b1bcb938fbce8a543147e1c /src/pipe.hpp
parentfb27a000d9383b503761d0124e7bd41115d70c9a (diff)
SWAP functionality removed
On-disk storage should be implemented in devices rather than in 0MQ core. 0MQ is a networking library and there's no point in storing network buffers on disk. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/pipe.hpp')
-rw-r--r--src/pipe.hpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/pipe.hpp b/src/pipe.hpp
index b4a0ffa..ed13478 100644
--- a/src/pipe.hpp
+++ b/src/pipe.hpp
@@ -26,7 +26,6 @@
#include "stdint.hpp"
#include "array.hpp"
#include "ypipe.hpp"
-#include "swap.hpp"
#include "config.hpp"
#include "object.hpp"
@@ -35,7 +34,7 @@ namespace zmq
// Creates a pipe. Returns pointer to reader and writer objects.
void create_pipe (object_t *reader_parent_, object_t *writer_parent_,
- uint64_t hwm_, int64_t swap_size_, class reader_t **reader_,
+ uint64_t hwm_, class reader_t **reader_,
class writer_t **writer_);
// The shutdown mechanism for pipe works as follows: Either endpoint
@@ -59,7 +58,7 @@ namespace zmq
class reader_t : public object_t, public array_item_t
{
friend void create_pipe (object_t*, object_t*, uint64_t,
- int64_t, reader_t**, writer_t**);
+ reader_t**, writer_t**);
friend class writer_t;
public:
@@ -128,7 +127,7 @@ namespace zmq
class writer_t : public object_t, public array_item_t
{
friend void create_pipe (object_t*, object_t*, uint64_t,
- int64_t, reader_t**, writer_t**);
+ reader_t**, writer_t**);
public:
@@ -136,8 +135,8 @@ namespace zmq
void set_event_sink (i_writer_events *endpoint_);
// Checks whether messages can be written to the pipe.
- // If writing the message would cause high watermark and (optionally)
- // if the swap is full, the function returns false.
+ // If writing the message would cause high watermark
+ // the function returns false.
bool check_write (zmq_msg_t *msg_);
// Writes a message to the underlying pipe. Returns false if the
@@ -156,19 +155,17 @@ namespace zmq
private:
writer_t (class object_t *parent_, pipe_t *pipe_, reader_t *reader_,
- uint64_t hwm_, int64_t swap_size_);
+ uint64_t hwm_);
~writer_t ();
// Command handlers.
void process_activate_writer (uint64_t msgs_read_);
void process_pipe_term ();
- // Tests whether underlying pipe is already full. The swap is not
- // taken into account.
+ // Tests whether underlying pipe is already full.
bool pipe_full ();
- // True, if this object can be written to. Undelying ypipe may be full
- // but as long as there's swap space available, this flag is true.
+ // True, if this object can be written to.
bool active;
// The underlying pipe.
@@ -187,20 +184,9 @@ namespace zmq
// Number of messages we have written so far.
uint64_t msgs_written;
- // Pointer to the message swap. If NULL, messages are always
- // kept in main memory.
- swap_t *swap;
-
// Sink for the events (either the socket or the session).
i_writer_events *sink;
- // If true, swap is active. New messages are to be written to the swap.
- bool swapping;
-
- // If true, there's a delimiter to be written to the pipe after the
- // swap is empied.
- bool pending_delimiter;
-
// True is 'terminate' method was called of 'pipe_term' command
// arrived from the reader.
bool terminating;