Module pravega_client::sync::synchronizer

source ·

Structs§

  • Insert struct is used internally to update the server side of map. The outer_key and inner_key are combined to identify a value in the nested map. The composite_key is derived from outer_key and inner_key, which is the actual key that’s stored on the server side. The type_id is used to identify the type of the value in the map since the value is just a serialized blob that does not contain any type information.
  • The Key struct in the in memory map. It contains two fields, the key and key_version. The key_version is used for conditional update on server side. If the key_version is i64::MIN, then the update will be unconditional.
  • The remove struct is used internally to remove a value from the server side of map. Unlike the Insert struct, it does not need to have a type_id since we don’t care about the value.
  • Provide a map that is synchronized across different processes.
  • The Update contains a nested map and a version map, which are the same map in synchronizer but will be updated instantly when caller calls Insert or Remove method. It is used to update the server side of table and its updates will be applied to synchronizer once the updates are successfully stored on the server side.
  • The Value struct in the in memory map. It contains two fields. type_id: it is used by caller to figure out the exact type of the data. data: the serialized Value.

Enums§

Constants§

Traits§

  • Clone trait helper.
  • The trait bound for the ValueData
  • Serialize trait helper, we need to serialize the ValueData in Insert struct into Vec.

Functions§

  • Deserialize the Value into the type T by using cbor deserializer. This method would be used by the user after calling get() of table_synchronizer.
  • Serialize the into the Vec by using cbor serializer. This method would be used by the insert method in table_synchronizer.