コード例 #1
0
def demo2():
    config=Config()
    config.set_username("dev")
    config.set_password("dev-pass")
    client=HazelcastClient(config)
    topic=client.getTopic("my-topic")
    string="Alert published by a Python client!"
    topic.publish(util.hzstringbytes(string))
    sys.exit()
コード例 #2
0
 def testDecodeEncode(self):
     mystring="dad"
     bytestuff=util.hzstringbytes(mystring)
     newstring=util.decodehzstring(bytestuff)
     self.assertEqual(mystring,newstring)