package io.apicurio.registry.storage.impl.kafkasql.messages;

import io.apicurio.registry.storage.RegistryStorage;
import io.apicurio.registry.storage.impl.kafkasql.AbstractMessage;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * @deprecated No longer produced. Retained so that existing Kafka journal entries can still be consumed
 *             after an upgrade. Scheduled cleanup now bypasses the journal and writes directly to SQL.
 */
@Deprecated
@NoArgsConstructor
@Builder
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@ToString
public class DeleteAllOrphanedContent0Message extends AbstractMessage {

    @Override
    public Object dispatchTo(RegistryStorage storage) {
        storage.deleteAllOrphanedContent();
        return null;
    }

}
