9 Commits

Author SHA1 Message Date
Isaku Yamahata
f3ba502bca controller/dispatcher: eliminate unregistering handlers
This patch eliminates unregistering handlers and inheritable handlers.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-24 10:10:28 +09:00
Isaku Yamahata
c597ecf1b7 controller/dispatcher: eliminate the use of WeakSet
As weakref.WeakSet is supported by python 2.7+. And RHEL 6.x uses python 2.6.x
So avoid weakref.WeakSet by replacing it with WeakValueDictionary which is
supported by weakref package from the beginning.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-09 21:57:55 +09:00
Isaku Yamahata
58658d3ed4 dispacher: introduce inheritable handler
Introduce inheritable handler which inherits during dispatcher change
for convenience. Thus, we don't have to watch dispatcher change event
and unregister/register.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:40 +09:00
Isaku Yamahata
f9bae8bb89 controller/dispatcher: introduce events on event queue itself
This patch introduces event queue event(event on event queue).
And track dispatcher children in order to register callback handler
for all children of a given dispatcher.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:37 +09:00
Isaku Yamahata
4dd1118b7d dispatcher: pass name to EventQueue and track all instances
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:35 +09:00
Isaku Yamahata
d6d7c9d6d2 controller/dispatcher: allow handler that accepts any event type
This type of handler will be used by event dumper application.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-02-01 08:55:33 +09:00
Isaku Yamahata
8e4446892b controller/dispatcher: pylint
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-31 06:41:32 +09:00
FUJITA Tomonori
67a06fc17f Use from gevent.queue import Queue
For consistency.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2012-01-17 23:04:32 +09:00
FUJITA Tomonori
aa5051a162 initial commit
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2011-12-09 15:56:05 +09:00