io.sirix.page.OverflowPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.
package io.sirix.page;
import io.sirix.api.PageTrx;
import io.sirix.page.interfaces.Page;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.List;
/**
* OverflowPage used to store records which are longer than a predefined threshold.
*
* @author Johannes Lichtenberger
*/
public final class OverflowPage implements Page {
/**
* Data to be stored.
*/
private final byte[] data;
public OverflowPage() {
data = new byte[0];
}
/**
* Constructor.
*
* @param data data to be stored
*/
public OverflowPage(final byte[] data) {
assert data != null;
this.data = data;
}
@Override
public List getReferences() {
throw new UnsupportedOperationException();
}
@Override
public void commit(@NonNull PageTrx pageWriteTrx) {
}
@Override
public PageReference getOrCreateReference(int offset) {
throw new UnsupportedOperationException();
}
@Override
public boolean setOrCreateReference(int offset, PageReference pageReference) {
throw new UnsupportedOperationException();
}
// @Override
// public void serialize(final PageReadOnlyTrx pageReadOnlyTrx, final Bytes out,
// final SerializationType type) {
// out.writeInt(data.length);
// out.write(data);
// }
public byte[] getData() {
return data;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy