private void addInstance(InstanceProfile profile) {
        LOGGER.info("add instance taskId {} instanceId {}", taskId, profile.getInstanceId());
        if (!shouldAddAgain(profile.getInstanceId(), profile.getFileUpdateTime())) {
            LOGGER.info("addInstance shouldAddAgain returns false skip taskId {} instanceId {}", taskId,
                    profile.getInstanceId());
            return;
        }
        addToStore(profile, true);
        addToMemory(profile);
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java