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

io.descoped.dc.api.content.ContentStreamBuffer Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package io.descoped.dc.api.content;

import de.huxhorn.sulky.ulid.ULID;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ContentStreamBuffer {

    ULID.Value ulid();

    default long timestamp() {
        return ulid().timestamp();
    }

    String position();

    Set keys();

    byte[] get(String contentKey);

    Map data();

    List manifest();

    interface Builder {

        Builder ulid(ULID.Value ulid);

        Builder position(String position);

        String position();

        ContentStreamBuffer.Builder put(String key, byte[] payload);

        Builder buffer(String contentKey, byte[] content, MetadataContent manifest);

        byte[] get(String contentKey);

        Set keys();

        List manifest();

        ContentStreamBuffer build();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy