CassandraTopic_binary.py
Go to the documentation of this file.
00001 import pycassa
00002 import StringIO
00003 
00004 from CassandraTopic_ import *
00005 
00006 class CassandraTopic_binary(CassandraTopic_):
00007     def __init__(self, MsgClass):        
00008         CassandraTopic_.__init__(MsgClass)
00009     
00010     def getColumnValidationClasses(self):
00011         return {'binary' : pycassa.BYTES_TYPE}
00012     
00013     def encode(self, msg):
00014         buffer = StringIO.StringIO()
00015         msg.serialize(buffer)
00016         return {"binary" : buffer.getvalue()}
00017     
00018     def decode(self, data):
00019         msg = self.MsgClass()
00020         msg.deserialize(data["binary"])
00021         return msg


cassandra_ros
Author(s):
autogenerated on Thu Jun 6 2019 21:09:27