Package etch.util.core.nio

Examples of etch.util.core.nio.ByteBufferPool


  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct1() throws Exception
  {
    // bufferSize <= 0
    new ByteBufferPool( -1, -1, -1, -1, -1 );
  }
View Full Code Here


  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct2() throws Exception
  {
    // bufferSize <= 0
    new ByteBufferPool( 0, -1, -1, -1, -1 );
  }
View Full Code Here

  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct3() throws Exception
  {
    // historyInterval < 0
    new ByteBufferPool( 4096, -1, -1, -1, -1 );
  }
View Full Code Here

  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct4() throws Exception
  {
    // min < 0
    new ByteBufferPool( 4096, -1, -1, 0, -1 );
  }
View Full Code Here

  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct5() throws Exception
  {
    // limit < min
    new ByteBufferPool( 4096, 0, -1, 0, -1 );
  }
View Full Code Here

  /** @throws Exception */
  @Test( expected = IllegalArgumentException.class )
  public void construct6() throws Exception
  {
    // len < 0
    new ByteBufferPool( 4096, 0, 10, 1, -1 );
  }
View Full Code Here

  /** @throws Exception */
  @Test
  public void construct7() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 1, 2, 3, 4, 5 );
    assertEquals( 1, p.bufferSize() );
    assertEquals( 2, p.min() );
    assertEquals( 3, p.limit() );
    assertEquals( 4, p.interval() );
    assertEquals( 5, p.length() );
    p.shutdown();
  }
View Full Code Here

  /** @throws Exception */
  @Test
  public void construct8() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 101, 103, 105, 107, 109 );
    assertEquals( 101, p.bufferSize() );
    assertEquals( 103, p.min() );
    assertEquals( 105, p.limit() );
    assertEquals( 107, p.interval() );
    assertEquals( 109, p.length() );
    p.shutdown();
  }
View Full Code Here

  /** @throws Exception */
  @Test
  public void construct9() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 101, 103, 105, 0, 109 );
    assertEquals( 101, p.bufferSize() );
    assertEquals( 103, p.min() );
    assertEquals( 105, p.limit() );
    assertEquals( 0, p.interval() );
    assertEquals( 0, p.length() );
    p.shutdown();
  }
View Full Code Here

  /** @throws Exception */
  @Test
  public void construct10() throws Exception
  {
    ByteBufferPool p = new ByteBufferPool( 101, 103, 105, 107, 0 );
    assertEquals( 101, p.bufferSize() );
    assertEquals( 103, p.min() );
    assertEquals( 105, p.limit() );
    assertEquals( 0, p.interval() );
    assertEquals( 0, p.length() );
    p.shutdown();
  }
View Full Code Here

TOP

Related Classes of etch.util.core.nio.ByteBufferPool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.