@Test public void testFileExceed() throws Exception { final int queueSize = 4000 ; String id = "testFileExceed"; FbQueue<String> queue = makeQueue(id, queueSize); int i = 0; try { for(; i < queueSize; ++i) { queue.add("<" + i + ">"); } fail("queue silent overflow"); } catch (FbException e) { assertEquals(storage.getMaxFiles() * queue.getMaxItemsInFile(), i); } catch (Exception e) { System.out.println("Fail at: " + i + " iteration "); throw e; } }
public int getMaxItemsInFile() { return QFileHandle.ITEMS_IN_FILE; }
FbQueue extends AbstractQueue<E> implements FileBased { public int getMaxItemsInFile() { return QFileHandle.ITEMS_IN_FILE; } }
FbQueue extends AbstractQueue<E> implements FileBased { public int getMaxItemsInFile() { return QFileHandle.ITEMS_IN_FILE; } private  FbQueue(Builder<E> b); }
FbQueue extends AbstractQueue<E> implements FileBased { public int getMaxItemsInFile() { return QFileHandle.ITEMS_IN_FILE; } private  FbQueue(Builder<E> b); String getId(); int getMaxSize(); int getMaxItemsInFile(); static Builder<E> builder(FbAdapter<E> adapter); @Override Iterator<E> iterator(); Iterator<E> iterator(int last); @Override int size(); @Override boolean offer(E e); void push(E e); @Override E poll(); @Override E peek(); @Override void close(); }
FbQueue extends AbstractQueue<E> implements FileBased { public int getMaxItemsInFile() { return QFileHandle.ITEMS_IN_FILE; } private  FbQueue(Builder<E> b); String getId(); int getMaxSize(); int getMaxItemsInFile(); static Builder<E> builder(FbAdapter<E> adapter); @Override Iterator<E> iterator(); Iterator<E> iterator(int last); @Override int size(); @Override boolean offer(E e); void push(E e); @Override E poll(); @Override E peek(); @Override void close();  }