Change in vdsm[master]: stomp: creation of outbox class
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Mon May 18 14:43:50 UTC 2015
Piotr Kliczewski has uploaded a new change for review.
Change subject: stomp: creation of outbox class
......................................................................
stomp: creation of outbox class
Change-Id: I2020b05393daeafaed73f628cf441305a2d52354
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M lib/yajsonrpc/stomp.py
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/41067/1
diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py
index a4b83af..86cbf6d 100644
--- a/lib/yajsonrpc/stomp.py
+++ b/lib/yajsonrpc/stomp.py
@@ -279,6 +279,27 @@
return None
+class Outbox(object):
+
+ def __init__(self):
+ self._outbox = deque()
+
+ def is_not_empty(self):
+ return (len(self._outbox) > 0)
+
+ def peek(self):
+ return self._outbox[0]
+
+ def pop(self):
+ return self._outbox.popleft()
+
+ def add_right(self, element):
+ self._outbox.append(element)
+
+ def add_left(self, element):
+ self._outbox.appendleft(element)
+
+
class AsyncDispatcher(object):
log = logging.getLogger("stomp.AsyncDispatcher")
--
To view, visit https://gerrit.ovirt.org/41067
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2020b05393daeafaed73f628cf441305a2d52354
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
More information about the vdsm-patches
mailing list