Asynchronously finds the record for a single key. Args: key: The key of the record to find. Returns: ObjectRef containing the record (in pydict form), or None if not found.
(self, key: Any)
| 136 | return block_to_workers, worker_to_blocks |
| 137 | |
| 138 | def get_async(self, key: Any) -> ObjectRef[Any]: |
| 139 | """Asynchronously finds the record for a single key. |
| 140 | |
| 141 | Args: |
| 142 | key: The key of the record to find. |
| 143 | |
| 144 | Returns: |
| 145 | ObjectRef containing the record (in pydict form), or None if not found. |
| 146 | """ |
| 147 | block_index = self._find_le(key) |
| 148 | if block_index is None: |
| 149 | return ray.put(None) |
| 150 | return self._worker_for(block_index).get.remote(block_index, key) |
| 151 | |
| 152 | def multiget(self, keys: List[Any]) -> List[Optional[Any]]: |
| 153 | """Synchronously find the records for a list of keys. |