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

io.bdeploy.bhive.objects.ReadOnlyObjectDatabase Maven / Gradle / Ivy

Go to download

Public API including dependencies, ready to be used for integrations and plugins.

There is a newer version: 7.4.0
Show newest version
package io.bdeploy.bhive.objects;

import java.io.IOException;
import java.nio.file.Path;

import io.bdeploy.bhive.model.ObjectId;
import io.bdeploy.common.ActivityReporter;

public class ReadOnlyObjectDatabase extends ObjectDatabase {

    public ReadOnlyObjectDatabase(Path root, ActivityReporter reporter) {
        // no tmp and no transactions - only required on writable databases.
        super(root, null, reporter, null);
    }

    @Override
    protected ObjectId internalAddObject(ObjectWriter writer) throws IOException {
        throw new UnsupportedOperationException("Read-only Database");
    }

    @Override
    public void removeObject(ObjectId id) {
        throw new UnsupportedOperationException("Read-only Database");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy