Package one.nio.os.bpf
Class BpfMap
java.lang.Object
one.nio.os.bpf.Handle
one.nio.os.bpf.BpfObj
one.nio.os.bpf.BpfMap
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intfinal intfinal intfinal intfinal intfinal MapTypefinal intFields inherited from class one.nio.os.bpf.BpfObj
id, MAX_NAME_LEN, name -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBufferbytes(byte[] value) static byte[]bytes(int i) static byte[]bytes(long i) byte[]get(byte[] key) booleanget(byte[] key, byte[] result) protected booleanget(byte[] key, byte[] result, int flags) static BpfMapgetByFd(int fd) static BpfMapgetById(int id) static BpfMapstatic IntBufferints(byte[] value) Iterable<byte[]> keys()static LongBufferlongs(byte[] value) static BpfMapstatic BpfMapnewMapOfMaps(MapType type, int keySize, int maxEntries, String name, int flags, BpfMap innerMap) static BpfMapnewPerfEventArray(String name, int flags) booleanput(byte[] key, byte[] value) protected booleanput(byte[] key, byte[] value, int flags) booleanputIfAbsent(byte[] key, byte[] value) booleanputIfPresent(byte[] key, byte[] value) booleanremove(byte[] key)
-
Field Details
-
CPUS
public static final int CPUS -
ARRAY_KEY_SIZE
public static final int ARRAY_KEY_SIZE- See Also:
-
type
-
keySize
public final int keySize -
valueSize
public final int valueSize -
totalValueSize
public final int totalValueSize -
maxEntries
public final int maxEntries -
flags
public final int flags
-
-
Method Details
-
get
- Throws:
IOException
-
get
- Throws:
IOException
-
get
- Throws:
IOException
-
put
- Throws:
IOException
-
putIfAbsent
- Throws:
IOException
-
putIfPresent
- Throws:
IOException
-
put
- Throws:
IOException
-
remove
- Throws:
IOException
-
keys
-
synchronizedMap
-
getPinned
- Throws:
IOException
-
getById
- Throws:
IOException
-
getByFd
- Throws:
IOException
-
newMap
public static BpfMap newMap(MapType type, int keySize, int valueSize, int maxEntries, String name, int flags) throws IOException - Throws:
IOException
-
newMapOfMaps
public static BpfMap newMapOfMaps(MapType type, int keySize, int maxEntries, String name, int flags, BpfMap innerMap) throws IOException - Throws:
IOException
-
newPerfEventArray
- Throws:
IOException
-
getAllIds
-
bytes
public static byte[] bytes(int i) -
bytes
public static byte[] bytes(long i) -
bytes
-
ints
-
longs
-