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

org.forstdb.ByteBufferGetStatus Maven / Gradle / Ivy

Go to download

ForSt fat jar with modifications specific for Apache Flink that contains .so files for linux32 and linux64 (glibc and musl-libc), jnilib files for Mac OSX, and a .dll for Windows x64.

There is a newer version: 0.1.2-beta
Show newest version
//  Copyright (c) Meta Platforms, Inc. and affiliates.
//
//  This source code is licensed under both the GPLv2 (found in the
//  COPYING file in the root directory) and Apache 2.0 License
//  (found in the LICENSE.Apache file in the root directory).

package org.forstdb;

import java.nio.ByteBuffer;
import java.util.List;

/**
 * A ByteBuffer containing fetched data, together with a result for the fetch
 * and the total size of the object fetched.
 * 

* Used for the individual results of * {@link RocksDB#multiGetByteBuffers(List, List)} * {@link RocksDB#multiGetByteBuffers(List, List, List)} * {@link RocksDB#multiGetByteBuffers(ReadOptions, List, List)} * {@link RocksDB#multiGetByteBuffers(ReadOptions, List, List, List)} */ public class ByteBufferGetStatus { public final Status status; public final int requiredSize; public final ByteBuffer value; /** * Constructor used for success status, when the value is contained in the buffer * * @param status the status of the request to fetch into the buffer * @param requiredSize the size of the data, which may be bigger than the buffer * @param value the buffer containing as much of the value as fits */ ByteBufferGetStatus(final Status status, final int requiredSize, final ByteBuffer value) { this.status = status; this.requiredSize = requiredSize; this.value = value; } /** * Constructor used for a failure status, when no value is filled in * * @param status the status of the request to fetch into the buffer */ @SuppressWarnings("PMD.NullAssignment") ByteBufferGetStatus(final Status status) { this.status = status; this.requiredSize = 0; this.value = null; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy