@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }

    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    RegisteredBackendStateMetaInfo<?, ?> that = (RegisteredBackendStateMetaInfo<?, ?>) o;

    if (!stateType.equals(that.stateType)) {
      return false;
    }

    if (!getName().equals(that.getName())) {
      return false;
    }

    if (getNamespaceSerializer() != null
        ? !getNamespaceSerializer().equals(that.getNamespaceSerializer())
        : that.getNamespaceSerializer() != null) {
      return false;
    }
    return getStateSerializer() != null
        ? getStateSerializer().equals(that.getStateSerializer())
        : that.getStateSerializer() == null;
  }
  public boolean isCompatibleWith(RegisteredBackendStateMetaInfo<?, ?> other) {

    if (this == other) {
      return true;
    }

    if (null == other) {
      return false;
    }

    if (!stateType.equals(StateDescriptor.Type.UNKNOWN)
        && !other.stateType.equals(StateDescriptor.Type.UNKNOWN)
        && !stateType.equals(other.stateType)) {
      return false;
    }

    if (!name.equals(other.getName())) {
      return false;
    }

    return namespaceSerializer.isCompatibleWith(other.namespaceSerializer)
        && stateSerializer.isCompatibleWith(other.stateSerializer);
  }