Loads an object with the hash and range key.
@param hashKey The hash key value.
@param rangeKey The range key value.
@return The object.
@see com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper#load
340114
public T load(H hashKey, R rangeKey) {
        return mapper.<T>load(model.targetType(), hashKey, rangeKey);
    }
1031937
public static <T, K, S, X extends Collection<T>> X loadNToOne(X list,
			Function<T, K> keyGetter,
			Function<Collection<K>, Collection<S>> loader,
			Function<S, K> loadedKeyGetter, BiConsumer<T, S> match) {
		if (list == null || list.size() == 0)
			return list;

		Set<K> keys = toSet(list, keyGetter);
		if (keys == null || keys.size() == 0)
			return list;

		Collection<S> subs = loader.apply(keys);
		if (subs == null || subs.size() == 0)
			return list;

		HashMap<K, S> map = toHashMap(subs, loadedKeyGetter);
		for (T item : list) {
			K key = keyGetter.apply(item);
			if (key == null)
				continue;

			S sub = map.get(key);
			if (sub == null)
				continue;
			match.accept(item, sub);
		}

		return list;
	}
1021677
<T> Method getRangeKeyGetter(Class<T> clazz) {
        synchronized (rangeKeyGetterCache) {
            if ( !rangeKeyGetterCache.containsKey(clazz) ) {
                Method rangeKeyMethod = null;
                for ( Method method : getRelevantGetters(clazz) ) {
                    if ( method.getParameterTypes().length == 0 && method.isAnnotationPresent(DynamoDBRangeKey.class)) {
                        rangeKeyMethod = method;
                        break;
                    }
                }
                rangeKeyGetterCache.put(clazz, rangeKeyMethod);
            }
        }
        return rangeKeyGetterCache.get(clazz);
    }
108608
@Override
	public synchronized CacheObject get(final Object key)
	{
		final CacheObject o = map.get(key);
		if (o != null) {
			updateAccess(o);
			++hits;
		}
		else
			++misses;
		return o;
	}
295677
@SuppressWarnings("rawtypes")
	public Set smembers(Object key) {
		Jedis jedis = getJedis();
		try {
			Set<byte[]> data = jedis.smembers(keyToBytes(key));
			Set<Object> result = new HashSet<Object>();
			valueSetFromBytesSet(data, result);
			return result;
		}
		finally {close(jedis);}
	}
512873
public TableKeysAndAttributes withHashAndRangeKeys(
            String hashKeyName, String rangeKeyName, 
            Object... alternatingHashAndRangeKeyValues) {
        if (hashKeyName == null)
            throw new IllegalArgumentException("hash key name must be specified");
        if (rangeKeyName == null)
            throw new IllegalArgumentException("range key name must be specified");
        if (alternatingHashAndRangeKeyValues.length % 2 != 0)
            throw new IllegalArgumentException("number of hash and range key values must be the same");
        final int len = alternatingHashAndRangeKeyValues.length / 2;
        PrimaryKey[] primaryKeys = new PrimaryKey[len];
        for (int i=0; i < alternatingHashAndRangeKeyValues.length; i += 2) {
            primaryKeys[i >> 1] = new PrimaryKey(
                hashKeyName, alternatingHashAndRangeKeyValues[i],
                rangeKeyName, alternatingHashAndRangeKeyValues[i+1]);
        }
        return withPrimaryKeys(primaryKeys);
    }
247888
@SuppressWarnings("unchecked")
    public V get(final int key)
    {
        V value = null;
        @DoNotSub final int setNumber = Hashing.hash(key, mask);
        @DoNotSub final int setBeginIndex = setNumber << setSizeShift;

        for (@DoNotSub int i = setBeginIndex, setEndIndex = setBeginIndex + setSize; i < setEndIndex; i++)
        {
            if (null == values[i])
            {
                break;
            }

            if (key == keys[i])
            {
                value = (V)values[i];
                break;
            }
        }

        if (null == value)
        {
            cacheMisses++;
        }
        else
        {
            cacheHits++;
        }

        return value;
    }
1065677
@Override
    public <T> T loadDataFromCache(Class<T> clazz, Object cacheKey, long maxTimeInCacheBeforeExpiry) throws CacheLoadingException, CacheCreationException {
        return getObjectPersister(clazz).loadDataFromCache(cacheKey, maxTimeInCacheBeforeExpiry);
    }
1234291
function setNewKey(_newKey) {
			if ( rangeName ) {
				/**
				 * If the model has a range attribute, _newKey must be an object that contains
				 * the hash and range attributes.
				 */
				_.extend( changed, _newKey );
			} else {
				/**
				 * If the model doesn't have a range attribute, _newKey must be the value of the hash attribute.
				 */
				changed[ hashName ] = _newKey;
			}

			// Add the new key attribute(s) to the Item to be sent to DynamoDB
			_.extend( params.Item, options.serializeDates === true ? serializeAllDates( model, _.clone( changed ) ) : changed );
		}
750397
@SuppressWarnings("all")
    public static Single<List<String>> getRange(CacheConfigBean cacheConfigBean, String cacheKey, int startIndex, int endIndex) {
        return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListRange", new JSONObject() {{
            put("cacheConfig", cacheConfigBean);
            put("key", cacheKey);
            put("startIndex", startIndex);
            put("endIndex", endIndex);
        }}).map(unitResponse -> {
            if (unitResponse.getData() != null)
                return unitResponse.dataToTypedList(String.class);
            else
                return null;
        });
    }
306977
public void loadTableLocal(byte []tableKey, Result<TableKraken> result)
  {
    if (tableKey == null) {
      result.ok(null);
      return;
    }
    
    TableKraken table = getTableByKeyImpl(tableKey);

    if (table != null) {
      result.ok(table);
      return;
    }

    RowCursor cursor = _metaTable.getTableKelp().cursor();
    cursor.setBytes(1, tableKey, 0);
    
    _metaTable.getTableKelp().get(cursor, result.then((v,r)->loadTableLocalImpl(tableKey, cursor, v, r)));
  }
1087626
def get_item(cls, hash_key, range_key=None):
        
        key = cls._encode_key(hash_key, range_key)
        raw_data = cls._get_connection().get_item(cls.get_table_name(), key)
        if 'Item' not in raw_data:
            raise ItemNotFoundException
        return cls.from_raw_data(raw_data['Item'])
395728
@Override
	public V get(K key) throws CacheException {
		logger.debug("get key [" + key + "]");

		if (key == null) {
			return null;
		}

		try {
			Object redisCacheKey = getRedisCacheKey(key);
			byte[] rawValue = redisManager.get(keySerializer.serialize(redisCacheKey));
			if (rawValue == null) {
				return null;
			}
			V value = (V) valueSerializer.deserialize(rawValue);
			return value;
		} catch (SerializationException e) {
			throw new CacheException(e);
		}
	}
1219187
private <T> T loadDataFromCache(final Class<T> clazz, final Object cacheKey, final long maxTimeInCacheBeforeExpiry) throws CacheLoadingException, CacheCreationException {
        return cacheManager.loadDataFromCache(clazz, cacheKey, maxTimeInCacheBeforeExpiry);
    }
1165629
def load(self, key):
        

        # Turn the key into a BucketKey
        if isinstance(key, basestring):
            key = BucketKey.decode(key)

        # Make sure the uuids match
        if key.uuid != self.uuid:
            raise ValueError("%s is not a bucket corresponding to this limit" %
                             key)

        # If the key is a version 1 key, load it straight from the
        # database
        if key.version == 1:
            raw = self.db.get(str(key))
            if raw is None:
                return self.bucket_class(self.db, self, str(key))
            return self.bucket_class.hydrate(self.db, msgpack.loads(raw),
                                             self, str(key))

        # OK, use a BucketLoader
        records = self.db.lrange(str(key), 0, -1)
        loader = BucketLoader(self.bucket_class, self.db, self, str(key),
                              records)

        return loader.bucket
1321842
public Result readHashcodeByRange(int index, int length, boolean debug, boolean useValue) // LI4337-17
    {
        final String methodName = "readHashcodeByRange()";
        Result result = getFromResultPool();
        result.data = null;
        HashtableOnDisk cache_instance = object_cache;;
        try {
            rwLock.readLock().lock();
            if (cache_instance != null) {
                if (index < 0) {
                    index = cache_instance.getPreviousRangeIndex();
                } else if (index > 0) {
                    index = cache_instance.getNextRangeIndex();
                } else {
                    cache_instance.initRangeIndex();
                }
                if (length == -1) {
                    length = cache_instance.size();
                }
                if (length <= 0) {
                    return result;
                }
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " before range index=" + index + " length=" + length);
                HashcodeReadCallback hrcb = new HashcodeReadCallback(invalidationBuffer, debug, useValue);
                int rangeIndex = cache_instance.iterateKeys(hrcb, index, length);
                cache_instance.addRangeIndex(rangeIndex);
                if (hrcb.isValidHashCode == true) {
                    result.totalHashcode = hrcb.totalHashcode;
                    result.data = hrcb.list;
                    result.dataSize = hrcb.count;
                    if ((hrcb.count + hrcb.expiredCount) == 100) {
                        result.bMore = true;
                    } else {
                        result.bMore = false;
                    }
                } else {
                    result.returnCode = HTODDynacache.NO_HASHCODE_OLD_FORMAT;
                }
            }
        } catch (FileManagerException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (HashtableOnDiskException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (IOException ex) {
            this.diskCacheException = ex;
            result.diskException = ex;
            result.returnCode = DISK_EXCEPTION;
        } catch (Exception ex) {
            result.returnCode = OTHER_EXCEPTION;
            result.diskException = ex;
        } finally {
            rwLock.readLock().unlock();
            if (result.returnCode != NO_EXCEPTION) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\n Exception: " + ExceptionUtility.getStackTrace(result.diskException));
            }
            if (result.returnCode == DISK_EXCEPTION || result.returnCode == OTHER_EXCEPTION) {
                com.ibm.ws.ffdc.FFDCFilter.processException(result.diskException, "com.ibm.ws.cache.HTODDynacache.readByRange", "1582", this);
            }
        }
        if (tc.isDebugEnabled())
            Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " returnCode=" + result.returnCode + " size=" + result.dataSize + " more=" + result.bMore);
        return result;
    }
1155801
public function get($table, $hash, $range = null, Context\Get $context = null)
    {
        if (null !== $this->logger) {
            $this->log('Get on table '.$table);
        }

        // Primary key
        $hash = new Attribute($hash);

        $parameters = array(
            'TableName' => $table,
            'Key'       => array(
                'HashKeyElement' => $hash->getForDynamoDB()
            )
        );

        // Range key
        if (null !== $range) {
            $range = new Attribute($range);
            $parameters['Key']['RangeKeyElement'] = $range->getForDynamoDB();
        }

        if (null !== $context) {
            $parameters += $context->getForDynamoDB();
        }

        if (null !== $this->logger) {
            $this->log('Get request paramaters : '.print_r($parameters, true), Logger::DEBUG);
        }

        $response = $this->connector->getItem($parameters);

        if (null !== $this->logger) {
            $this->log('Get request response : '.print_r($response, true), Logger::DEBUG);
        }

        $this->addConsumedReadUnits($table, floatval($response['ConsumedCapacityUnits']));

        if (isset($response['Item'])) {
            $item = new Item($table);
            $item->populateFromDynamoDB($response['Item']);
            return $item;
        } else {
            if (null !== $this->logger) {
                $this->log('Didn\'t find item');
            }
            return null;
        }
    }