@Test public void totalOverCapacityRequestSpaceTest() throws TException { Assert.assertTrue(mWorkerServiceHandler.requestSpace(1, WORKER_CAPACITY_BYTES / 2)); Assert.assertTrue(mWorkerServiceHandler.requestSpace(2, WORKER_CAPACITY_BYTES / 2)); Assert.assertFalse(mWorkerServiceHandler.requestSpace(1, WORKER_CAPACITY_BYTES / 2)); Assert.assertFalse(mWorkerServiceHandler.requestSpace(2, WORKER_CAPACITY_BYTES / 2)); }
@Override public boolean requestSpace(long userId, long requestBytes) throws TException { return mWorkerStorage.requestSpace(userId, requestBytes); }
WorkerServiceHandler implements WorkerService.Iface { @Override public boolean requestSpace(long userId, long requestBytes) throws TException { return mWorkerStorage.requestSpace(userId, requestBytes); } }
WorkerServiceHandler implements WorkerService.Iface { @Override public boolean requestSpace(long userId, long requestBytes) throws TException { return mWorkerStorage.requestSpace(userId, requestBytes); } WorkerServiceHandler(WorkerStorage workerStorage); }
WorkerServiceHandler implements WorkerService.Iface { @Override public boolean requestSpace(long userId, long requestBytes) throws TException { return mWorkerStorage.requestSpace(userId, requestBytes); } WorkerServiceHandler(WorkerStorage workerStorage); @Override void accessBlock(long blockId); @Override void addCheckpoint(long userId, int fileId); @Override boolean asyncCheckpoint(int fileId); @Override void cacheBlock(long userId, long blockId); @Override String getDataFolder(); @Override String getUserTempFolder(long userId); @Override String getUserUnderfsTempFolder(long userId); @Override void lockBlock(long blockId, long userId); @Override boolean requestSpace(long userId, long requestBytes); @Override void returnSpace(long userId, long returnedBytes); @Override void unlockBlock(long blockId, long userId); @Override void userHeartbeat(long userId); }
WorkerServiceHandler implements WorkerService.Iface { @Override public boolean requestSpace(long userId, long requestBytes) throws TException { return mWorkerStorage.requestSpace(userId, requestBytes); } WorkerServiceHandler(WorkerStorage workerStorage); @Override void accessBlock(long blockId); @Override void addCheckpoint(long userId, int fileId); @Override boolean asyncCheckpoint(int fileId); @Override void cacheBlock(long userId, long blockId); @Override String getDataFolder(); @Override String getUserTempFolder(long userId); @Override String getUserUnderfsTempFolder(long userId); @Override void lockBlock(long blockId, long userId); @Override boolean requestSpace(long userId, long requestBytes); @Override void returnSpace(long userId, long returnedBytes); @Override void unlockBlock(long blockId, long userId); @Override void userHeartbeat(long userId);  }