serialization :: AsyncCache :: use_even=
Should this end use even numbers?serialization $ AsyncCache :: SELF
Type of this instance, automatically specialized in every classserialization $ AsyncCache :: next_available_id
Get a free id to associate to an object in the cachecore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
serialization :: DeserializerCache :: has_id
Is there an object associated toid
?
serialization :: SerializerCache :: has_object
Isobject
known?
serialization :: SerializerCache :: id_for
Get the id forobject
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
serialization :: SerializerCache :: new_id_for
Get a new id forobject
and store it
serialization :: SerializerCache :: next_available_id
Get a free id to associate to an object in the cacheserialization :: DeserializerCache :: object_for
Get the object associated toid
core :: Object :: output_class_name
Display class name on stdout (debug only).serialization :: DeserializerCache :: received
Map of references to already deserialized objects.serialization :: DeserializerCache :: received=
Map of references to already deserialized objects.serialization :: SerializerCache :: sent
Map of already serialized objects to the reference idserialization :: SerializerCache :: sent=
Map of already serialized objects to the reference idserialization :: AsyncCache :: use_even=
Should this end use even numbers?serialization :: DeserializerCache
Cache of received objects sorted by there reference id
# A shared cache where 2 clients serialize objects at the same types, prevents references collision
class AsyncCache
super DuplexCache
# Should this end use even numbers?
var use_even: Bool
private var last_id: Int is lazy do return if use_even then 0 else 1
redef fun next_available_id
do
last_id += 2
return last_id
end
end
lib/serialization/caching.nit:123,1--137,3