@Private
public abstract class ByteArrayManager
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ByteArrayManager.Conf |
Configuration for ByteArrayManager.
|
| Constructor | Description |
|---|---|
ByteArrayManager() |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
leastPowerOfTwo(int n) |
|
abstract byte[] |
newByteArray(int size) |
Create a byte array for the given length, where the length of
the returned array is larger than or equal to the given length.
|
static ByteArrayManager |
newInstance(ByteArrayManager.Conf conf) |
|
abstract int |
release(byte[] array) |
Release the given byte array.
|
public static int leastPowerOfTwo(int n)
org.apache.hadoop.HadoopIllegalArgumentException - if n <= 0.public abstract byte[] newByteArray(int size)
throws java.lang.InterruptedException
release(byte[]) method.java.lang.InterruptedExceptionpublic abstract int release(byte[] array)
newByteArray(int) method.public static ByteArrayManager newInstance(ByteArrayManager.Conf conf)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.