#NEWLINE# def get_concat( self , prefix , key , cb ) : #NEWLINE# #INDENT# ' Get value for key: prefix+key, first look in localstore\n            Return value is list. The storage could be eventually consistent.\n            For example a remove might only have reached part of the\n            storage and hence the return list might contain removed items,\n            but also missing items.\n        ' #NEWLINE# if ( not cb ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( ( prefix + cb ) in self . localstore_sets ) : #NEWLINE# #INDENT# _log . analyze ( self . node . id , '+ GET LOCAL' , None ) #NEWLINE# value = self . localstore_sets [ ( prefix + key ) ] #NEWLINE# local_list = list ( value [ '+' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# local_list = [ ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . storage . get_concat ( key = ( prefix + key ) , cb = CalvinCB ( func = self . get_concat_cb , org_cb = cb , org_key = key , local_list = local_list ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# _log . error ( ( 'Failed to get: %s' % key ) , exc_info = True ) #NEWLINE# async . DelayedCall ( 0 , cb , key = key , value = ( local_list if local_list else None ) )