private void stat(InstanceStateEnum state) {
            switch (state) {
                case DEFAULT: {
                    defaultCount++;
                    break;
                }
                case FINISHED: {
                    finishedCount++;
                    break;
                }
                case DELETE: {
                    deleteCount++;
                }
                default: {
                    otherCount++;
                }
            }
        }
handle the instance created by task, including add, delete, update etc.
the instance info is saved in both store and memory.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java