public final synchronized void allocateResources() throws IOException { if (!isInitialized) { this.pd = group.createProtectionDomainRaw(this); this.cqProcessor = group.createCqProviderRaw(this); this.qp = group.createQpProviderRaw(this); isInitialized = true; init(); connState = CONN_STATE_RESOURCES_ALLOCATED; notifyAll(); } }
@Override protected synchronized void init() throws IOException { super.init(); for (int i = 0; i < RdmaConstants.STORAGE_RDMA_QUEUESIZE; i++){ SVCPostSend write = initWriteOp(); writeOps.add(write); SVCPostSend read = initReadOp(); readOps.add(read); } IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); }
@Override protected synchronized void init() throws IOException { super.init(); IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); for(int i = 0; i < pipelineLength; i++){ recvBufs[i] = ByteBuffer.allocateDirect(bufferSize); sendBufs[i] = ByteBuffer.allocateDirect(bufferSize); this.recvCall[i] = setupRecvTask(recvBufs[i], i); this.sendCall[i] = setupSendTask(sendBufs[i], i); } }
@Override protected synchronized void init() throws IOException { super.init(); IbvCQ cq = getCqProvider().getCQ(); this.wcList = new IbvWC[getCqProvider().getCqSize()]; for (int i = 0; i < wcList.length; i++){ wcList[i] = new IbvWC(); } this.poll = cq.poll(wcList, wcList.length); for(int i = 0; i < pipelineLength; i++){ recvBufs[i] = ByteBuffer.allocateDirect(bufferSize); sendBufs[i] = ByteBuffer.allocateDirect(bufferSize); this.recvCall[i] = setupRecvTask(recvBufs[i], i); this.sendCall[i] = setupSendTask(sendBufs[i], i); } this.installRecvs(pipelineLength); }
public void init() throws IOException{ super.init();