class EventDispatcher implements PathChildrenCacheListener {

  @Override
  public void childEvent(final CuratorFramework client, final PathChildrenCacheEvent event) throws Exception {
    final PathChildrenCacheEvent.Type original = event.getType();
    final TransientStoreEventType mapped = MAPPINGS.get(original);
    if (mapped != null) { // dispatch the event to listeners only if it can be mapped
      final String path = event.getData().getPath();
      final byte[] bytes = event.getData().getData();
      final V value = store.getConfig().getSerializer().deserialize(bytes);
      store.fireListeners(TransientStoreEvent.of(mapped, path, value));
    }
  }

  protected  EventDispatcher(final ZkEphemeralStore<V> store);

}