def load_summary_protos(java_application=False):
 tmpl = ((config.KEY_PREFIX + config.KEY_TEMPLATE) + config.PART_SUFFIX)
 if java_application:
  tmpl = (('"' + tmpl) + '"')
 keys = [(tmpl % i) for i in range(0, (config.KEY_DISTANCE * config.KEY_MODULUS), config.KEY_DISTANCE)]
 results = memcache.get_multi(keys, namespace=config.KEY_NAMESPACE)
 records = []
 for rec in results.itervalues():
  try:
   pb = StatsProto(rec)
  except Exception as err:
   logging.warn('Bad record: %s', err)
  else:
   records.append(pb)
 logging.info('Loaded %d raw summary records, %d valid', len(results), len(records))
 records.sort(key=(lambda pb: (- pb.start_timestamp_milliseconds())))
 return records

def load_summary_protos ( java_application = False ) : tmpl = ( ( config . KEY_PREFIX + config . KEY_TEMPLATE ) + config . PART_SUFFIX ) if java_application : tmpl = ( ( '"' + tmpl ) + '"' ) keys = [ ( tmpl % i ) for i in range ( 0 , ( config . KEY_DISTANCE * config . KEY_MODULUS ) , config . KEY_DISTANCE ) ] results = memcache . get_multi ( keys , namespace = config . KEY_NAMESPACE ) records = [ ] for rec in results . itervalues ( ) : try : pb = StatsProto ( rec ) except Exception as err : logging . warn ( 'Bad record: %s' , err ) else : records . append ( pb ) logging . info ( 'Loaded %d raw summary records, %d valid' , len ( results ) , len ( records ) ) records . sort ( key = ( lambda pb : ( - pb . start_timestamp_milliseconds ( ) ) ) ) return records
load all valid summary records from memcache .