@@ -98,16 +98,16 @@ The following is an example of a class that extends
9898 return 1
9999
100100 def write_data (self , output ):
101- output.write_utf (self .street)
101+ output.write_string (self .street)
102102 output.write_int(self .zip_code)
103- output.write_utf (self .city)
104- output.write_utf (self .state)
103+ output.write_string (self .city)
104+ output.write_string (self .state)
105105
106106 def read_data (self , input ):
107- self .street = input .read_utf ()
107+ self .street = input .read_string ()
108108 self .zip_code = input .read_int()
109- self .city = input .read_utf ()
110- self .state = input .read_utf ()
109+ self .city = input .read_string ()
110+ self .state = input .read_string ()
111111
112112
113113 .. Note :: Refer to ``ObjectDataInput``/``ObjectDataOutput`` classes in
@@ -199,10 +199,10 @@ following:
199199 return 1
200200
201201 def write_portable (self , writer ):
202- writer.write_utf (" foo" , self .foo)
202+ writer.write_string (" foo" , self .foo)
203203
204204 def read_portable (self , reader ):
205- self .foo = reader.read_utf (" foo" )
205+ self .foo = reader.read_string (" foo" )
206206
207207
208208 .. Note :: Refer to ``PortableReader``/``PortableWriter`` classes in the
@@ -299,12 +299,12 @@ Foo class:
299299 return 2
300300
301301 def write_portable (self , writer ):
302- writer.write_utf (" foo" , self .foo)
303- writer.write_utf (" foo2" , self .foo2)
302+ writer.write_string (" foo" , self .foo)
303+ writer.write_string (" foo2" , self .foo2)
304304
305305 def read_portable (self , reader ):
306- self .foo = reader.read_utf (" foo" )
307- self .foo2 = reader.read_utf (" foo2" )
306+ self .foo = reader.read_string (" foo" )
307+ self .foo2 = reader.read_string (" foo2" )
308308
309309 You should consider the following when you perform versioning:
310310
@@ -377,10 +377,10 @@ Let’s say your custom ``MusicianSerializer`` will serialize
377377 pass
378378
379379 def write (self , output , obj ):
380- output.write_utf (obj.name)
380+ output.write_string (obj.name)
381381
382382 def read (self , input ):
383- name = input .read_utf ()
383+ name = input .read_string ()
384384 return Musician(name)
385385
386386 Note that the serializer ``id `` must be unique as Hazelcast will use it
@@ -487,10 +487,10 @@ is shown below.
487487 pass
488488
489489 def write (self , output , obj ):
490- output.write_utf (some_third_party_serializer.serialize(obj))
490+ output.write_string (some_third_party_serializer.serialize(obj))
491491
492492 def read (self , input ):
493- return some_third_party_serializer.deserialize(input .read_utf ())
493+ return some_third_party_serializer.deserialize(input .read_string ())
494494
495495 You should register the global serializer to the client.
496496
0 commit comments