class_docstr: Manages all state for endpoints in the system.
  
  This class is *not* thread safe, so any state-modifying methods should be
  called with a lock held.
class_docstr_tok: ["Manages","all","state","for","endpoints","in","the","system",".","This","class","is","*","not","*","thread","safe",",","so","any","state-modifying","methods","should","be","called","with","a","lock","held","."]
code: def __init__(
      self, kv_store: KVStoreBase, long_poll_host: LongPollHost
  ):
      self._kv_store = kv_store
      self._long_poll_host = long_poll_host
      self._endpoints: Dict[EndpointTag, EndpointInfo] = dict()
  
      checkpoint = self._kv_store.get(CHECKPOINT_KEY)
      if checkpoint is not None:
          self._endpoints = cloudpickle.loads(checkpoint)
  
      self._notify_route_table_changed()
  
file_path: ray/python/ray/serve/_private/endpoint_state.py
imports: import logging
  from typing import Any, Dict, Optional
  from ray import cloudpickle
  from ray.serve._private.common import EndpointInfo, EndpointTag
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.long_poll import LongPollHost, LongPollNamespace
  from ray.serve._private.storage.kv_store import KVStoreBase
label_desc: Use image node_id 1 to create a new EndpointState object  with example: obj = EndpointState(kv_store, long_poll_host)