java - Is shared Memcache guarantees the order of a list? -
i putting list of objects in shared memcache below.
list<terminology> terminologylist = companyservice.getterminologylist(); memcacheservice memcacheservice = memcacheservicefactory.getmemcacheservice(); memcacheservice.put("terminologylist", "terminologylist") list<terminology> oldterminologylist = (list<terminology>)memcacheservice.get("terminologylist");
will terminologylist , oldterminologylist come in same order?
yes guarantee order.
it's not memcache guarantees order, because memcache stores byte array. it's client side java api object-to-byte-array serialization, uses plain java serialization. guarantees object put in same object out.
also, order of objects in list guaranteed specification: a list ordered collection (sometimes called sequence)
. maintain order of elements put in.
Comments
Post a Comment