All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.marklogic.client.io.marker.ResendableContentHandle Maven / Gradle / Ivy

The newest version!
/*
 * Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
 */
package com.marklogic.client.io.marker;

/**
 * A Resendable Content Handle provides an adapter for a content
 * representation that can be read multiple times for purposes
 * such as resending input when retrying after a failed request.
 * @param  the handled content representation
 * @param  the serialization when reading the content
 */
public interface ResendableContentHandle extends BufferableContentHandle {
    @Override
    ResendableContentHandle newHandle();
    @Override
    ResendableContentHandle[] newHandleArray(int length);

    @Override
    default ResendableContentHandle newHandle(C content) {
        ResendableContentHandle handle = newHandle();
        handle.set(content);
        return handle;
    }

    @Override
    default ResendableContentHandle resendableHandleFor(C content) {
        return newHandle(content);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy