同步接受确认消息
        :param key: correlation_id
        :param result 服务端返回的消息
428021
def accept(self, key, result):
        
        self.data[key]['isAccept'] = True  # 设置为已经接受到服务端返回的消息
        self.data[key]['result'] = str(result)
        self._channel.queue_delete(self.data[key]['reply_queue_name'])
893411
def incr(self, key, delta=1):
        
        return uwsgi.cache_inc(key, delta, self.timeout, self.name)
1232394
def delete_key(self, key_id):
        
        key = self.key(key_id)
        if key:
            return key.delete()
        return False
505466
public void remove(String correlationId, String key) {
		synchronized (_lock) {
			// Get the entry
			CacheEntry entry = _cache.get(key);

			// Remove entry from the cache
			if (entry != null) {
				_cache.remove(key);
				_count--;
			}
		}
	}
833592
def related_results(self):
        
        return bind_api(
            api=self,
            path='/related_results/show/{id}.json',
            payload_type='relation', payload_list=True,
            allowed_param=['id'],
            require_auth=False
        )
289105
def retrieve(self, key):
        """"""
        column_file = os.path.join(self._hash_dir, '%s.json' % key)
        cache_file = os.path.join(self._hash_dir, '%s.npy' % key)

        if os.path.exists(cache_file):
            data = np.load(cache_file)
            if os.path.exists(column_file):
                with open(column_file, 'r') as json_file:
                    columns = json.load(json_file)
                data = pd.DataFrame(data, columns=columns)
        else:
            return None

        return data
1113490
def get(self, key):
        
        try:
            return self[self.id_lookup.get(key)]

        except TypeError:
            raise KeyError
1162475
public static CorrelationKey unmarshalCorrelationKey( String key ) {
        CorrelationKeyFactory factory = KieInternalServices.Factory.get().newCorrelationKeyFactory();
        if( key == null || key.isEmpty() ) {
           return factory.newCorrelationKey(Collections.EMPTY_LIST);
        }
        List<String> keys = new ArrayList<String>();
        for( String k : key.split(":") ) {
            keys.add(k);
        }
        return KieInternalServices.Factory.get().newCorrelationKeyFactory().newCorrelationKey(keys);
    }
1221437
def _make_key(relation):
    
    return _ReferenceKey(_lower(relation.database),
                         _lower(relation.schema),
                         _lower(relation.identifier))
655370
def check_key(self, key: str) -> bool:
        
        keys = self.get_keys()
        return key in keys
202465
public ConnectionParams resolveOne(String correlationId, String key) {
		ConnectionParams connection = null;

		synchronized (_lock) {
			for (DiscoveryItem item : _items) {
				if (item.key == key && item.connection != null) {
					connection = item.connection;
					break;
				}
			}
		}

		return connection;
	}
712949
def getParam(self, key):
        
        cur = self._conn.cursor()
        cur.execute("SHOW %s" % key)
        row = cur.fetchone()
        return util.parse_value(row[0])
1296118
def _ekey(self, key):
        '''  '''
        key = key.replace('-','_').upper()
        if key in self.cgikeys:
            return key
        return 'HTTP_' + key
553979
def get_key(key_name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        key = conn.get_key_pair(key_name)
        log.debug("the key to return is : %s", key)
        if key is None:
            return False
        return key.name, key.fingerprint
    except boto.exception.BotoServerError as e:
        log.debug(e)
        return False
732045
def make_result(self, key, value):
        
        v = OperationResult()
        v.key = key
        return v
954958
def _compute_key(self, id, nbytes):
        """"""
        m = Message()
        m.add_mpint(self.K)
        m.add_bytes(self.H)
        m.add_byte(b(id))
        m.add_bytes(self.session_id)
        out = sofar = sha1(m.asbytes()).digest()
        while len(out) < nbytes:
            m = Message()
            m.add_mpint(self.K)
            m.add_bytes(self.H)
            m.add_bytes(sofar)
            digest = sha1(m.asbytes()).digest()
            out += digest
            sofar += digest
        return out[:nbytes]
927078
def get(self, key, key_length=0):
        
        if key_length < 1:
            key_length = len(key)
        return self.get_method(self, key, key_length)