MCPcopy Index your code
hub / github.com/questdb/questdb / Kqueue

Method Kqueue

core/src/main/java/io/questdb/network/Kqueue.java:48–63  ·  view source on GitHub ↗
(KqueueFacade kqf, int capacity)

Source from the content-addressed store, hash-verified

46 private long writeAddress;
47
48 public Kqueue(KqueueFacade kqf, int capacity) {
49 try {
50 this.kqf = kqf;
51 this.capacity = capacity;
52 this.bufferSize = KqueueAccessor.SIZEOF_KEVENT * capacity;
53 this.changeList = this.writeAddress = Unsafe.calloc(bufferSize, MemoryTag.NATIVE_IO_DISPATCHER_RSS);
54 this.eventList = this.readAddress = Unsafe.calloc(bufferSize, MemoryTag.NATIVE_IO_DISPATCHER_RSS);
55 this.kq = Files.createUniqueFd(kqf.kqueue());
56 if (kq < 0) {
57 throw NetworkError.instance(kqf.getNetworkFacade().errno(), "could not create kqueue");
58 }
59 } catch (Throwable t) {
60 close();
61 throw t;
62 }
63 }
64
65 @Override
66 public void close() {

Callers

nothing calls this directly

Calls 7

callocMethod · 0.95
createUniqueFdMethod · 0.95
instanceMethod · 0.95
closeMethod · 0.95
kqueueMethod · 0.65
errnoMethod · 0.65
getNetworkFacadeMethod · 0.65

Tested by

no test coverage detected