private Type getEventChangedType()

in mode/cluster/repository/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/listener/NamingEventListener.java [93:104]


    private Type getEventChangedType(final Instance preInstance, final Instance instance) {
        if (null == preInstance && null != instance) {
            return Type.ADDED;
        }
        if (null != preInstance && null != instance && NacosMetaDataUtils.getTimestamp(preInstance) != NacosMetaDataUtils.getTimestamp(instance)) {
            return Type.UPDATED;
        }
        if (null != preInstance && null == instance) {
            return Type.DELETED;
        }
        return Type.IGNORED;
    }