public class BpfMap extends BpfObj implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static int |
ARRAY_KEY_SIZE |
static int |
CPUS |
int |
flags |
int |
keySize |
int |
maxEntries |
int |
totalValueSize |
MapType |
type |
int |
valueSize |
id, MAX_NAME_LEN, name| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
bytes(byte[] value) |
static byte[] |
bytes(int i) |
static byte[] |
bytes(long i) |
byte[] |
get(byte[] key) |
boolean |
get(byte[] key,
byte[] result) |
protected boolean |
get(byte[] key,
byte[] result,
int flags) |
static java.lang.Iterable<java.lang.Integer> |
getAllIds() |
static BpfMap |
getByFd(int fd) |
static BpfMap |
getById(int id) |
static BpfMap |
getPinned(java.lang.String path) |
static java.nio.IntBuffer |
ints(byte[] value) |
java.lang.Iterable<byte[]> |
keys() |
static java.nio.LongBuffer |
longs(byte[] value) |
static BpfMap |
newMap(MapType type,
int keySize,
int valueSize,
int maxEntries,
java.lang.String name,
int flags) |
static BpfMap |
newMapOfMaps(MapType type,
int keySize,
int maxEntries,
java.lang.String name,
int flags,
BpfMap innerMap) |
static BpfMap |
newPerfEventArray(java.lang.String name,
int flags) |
boolean |
put(byte[] key,
byte[] value) |
protected boolean |
put(byte[] key,
byte[] value,
int flags) |
boolean |
putIfAbsent(byte[] key,
byte[] value) |
boolean |
putIfPresent(byte[] key,
byte[] value) |
boolean |
remove(byte[] key) |
BpfMap |
synchronizedMap() |
public static final int CPUS
public static final int ARRAY_KEY_SIZE
public final MapType type
public final int keySize
public final int valueSize
public final int totalValueSize
public final int maxEntries
public final int flags
public boolean get(byte[] key,
byte[] result)
throws java.io.IOException
java.io.IOExceptionprotected boolean get(byte[] key,
byte[] result,
int flags)
throws java.io.IOException
java.io.IOExceptionpublic byte[] get(byte[] key)
throws java.io.IOException
java.io.IOExceptionpublic boolean put(byte[] key,
byte[] value)
throws java.io.IOException
java.io.IOExceptionpublic boolean putIfAbsent(byte[] key,
byte[] value)
throws java.io.IOException
java.io.IOExceptionpublic boolean putIfPresent(byte[] key,
byte[] value)
throws java.io.IOException
java.io.IOExceptionprotected boolean put(byte[] key,
byte[] value,
int flags)
throws java.io.IOException
java.io.IOExceptionpublic boolean remove(byte[] key)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Iterable<byte[]> keys()
public BpfMap synchronizedMap()
public static BpfMap getPinned(java.lang.String path) throws java.io.IOException
java.io.IOExceptionpublic static BpfMap getById(int id) throws java.io.IOException
java.io.IOExceptionpublic static BpfMap getByFd(int fd) throws java.io.IOException
java.io.IOExceptionpublic static BpfMap newMap(MapType type, int keySize, int valueSize, int maxEntries, java.lang.String name, int flags) throws java.io.IOException
java.io.IOExceptionpublic static BpfMap newMapOfMaps(MapType type, int keySize, int maxEntries, java.lang.String name, int flags, BpfMap innerMap) throws java.io.IOException
java.io.IOExceptionpublic static BpfMap newPerfEventArray(java.lang.String name, int flags) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.Iterable<java.lang.Integer> getAllIds()
public static byte[] bytes(int i)
public static byte[] bytes(long i)
public static java.nio.ByteBuffer bytes(byte[] value)
public static java.nio.IntBuffer ints(byte[] value)
public static java.nio.LongBuffer longs(byte[] value)