code: public void removeObjectListeners(Class<?> objectClass, long objectId) {
          if (objectClass == null) {
              return;
          }
          synchronized (objectListeners) {
              Map<Long, Map<Class<? extends ObjectAttachableListener>,
                      Map<ObjectAttachableListener, ListenerManagerImpl<? extends ObjectAttachableListener>>>>
                      objects = objectListeners.get(objectClass);
              if (objects == null) {
                  return;
              }
              // Remove all listeners
              objects.computeIfPresent(objectId, (id, listeners) -> {
                  listeners.values().stream()
                          .flatMap(map -> map.values().stream())
                          .forEach(ListenerManagerImpl::removed);
                  listeners.clear();
                  return null;
              });
              // Cleanup
              if (objects.isEmpty()) {
                  objectListeners.remove(objectClass);
              }
          }
      }
docs: Remove all listeners attached to an object.
  
  @param objectClass The class of the object.
  @param objectId The id of the object.