Package com.browseengine.bobo.util

Examples of com.browseengine.bobo.util.BigIntBuffer


  public void testBufferedLoaderReuse() throws Throwable
  {
    int maxId = 5000;
    int[] maxNumItems = { 25, 50, 20, 100, 15, 500, 10, 1000, 5, 2000, 2 };
    int[][] count = new int[maxNumItems.length][maxId];
    BigIntBuffer buffer = new BigIntBuffer();
    BufferedLoader loader = new BufferedLoader(maxId, BigNestedIntArray.MAX_ITEMS, buffer);
    BigNestedIntArray[] nestedArray = new BigNestedIntArray[maxNumItems.length];
   
    for(int i = 0 ; i < maxNumItems.length; i++)
    {
View Full Code Here


  {
    int maxId = 4096;
    int[] maxNumItems = {1, 1, 2, 2, 3, 3, 3, 3, 1, 1 };
    int[] minNumItems = {1, 1, 0, 1, 0, 0, 2, 3, 1, 0 };
    int[] count = new int[maxId];
    BigIntBuffer buffer = new BigIntBuffer();
    BufferedLoader loader = null;
    BigNestedIntArray nestedArray = new BigNestedIntArray();
    Random rand = new Random();
   
    for(int i = 0; i < maxNumItems.length; i++)
View Full Code Here

  private BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea)
  {
    if(workArea == null)
    {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    }
    else
    {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if(buffer == null)
      {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      }
      else
      {
        buffer.reset();
      }
     
      BufferedLoader loader = workArea.get(BufferedLoader.class);     
      if(loader == null || loader.capacity() < maxdoc)
      {
View Full Code Here

  public void testBufferedLoaderReuse() throws Throwable {
    int maxId = 5000;
    int[] maxNumItems = { 25, 50, 20, 100, 15, 500, 10, 1000, 5, 2000, 2 };
    int[][] count = new int[maxNumItems.length][maxId];
    BigIntBuffer buffer = new BigIntBuffer();
    BufferedLoader loader = new BufferedLoader(maxId, BigNestedIntArray.MAX_ITEMS, buffer);
    BigNestedIntArray[] nestedArray = new BigNestedIntArray[maxNumItems.length];

    for (int i = 0; i < maxNumItems.length; i++) {
      for (int id = 0; id < maxId; id++) {
View Full Code Here

  public void testMemoryReuse() throws Throwable {
    int maxId = 4096;
    int[] maxNumItems = { 1, 1, 2, 2, 3, 3, 3, 3, 1, 1 };
    int[] minNumItems = { 1, 1, 0, 1, 0, 0, 2, 3, 1, 0 };
    int[] count = new int[maxId];
    BigIntBuffer buffer = new BigIntBuffer();
    BufferedLoader loader = null;
    BigNestedIntArray nestedArray = new BigNestedIntArray();
    Random rand = new Random();

    for (int i = 0; i < maxNumItems.length; i++) {
View Full Code Here

    }
  }

  protected BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea) {
    if (workArea == null) {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    } else {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if (buffer == null) {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      } else {
        buffer.reset();
      }

      BufferedLoader loader = workArea.get(BufferedLoader.class);
      if (loader == null || loader.capacity() < maxdoc) {
        loader = new BufferedLoader(maxdoc, _maxItems, buffer);
View Full Code Here

  protected BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea)
  {
    if(workArea == null)
    {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    }
    else
    {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if(buffer == null)
      {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      }
      else
      {
        buffer.reset();
      }
     
      BufferedLoader loader = workArea.get(BufferedLoader.class);     
      if(loader == null || loader.capacity() < maxdoc)
      {
View Full Code Here

  private BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea)
  {
    if(workArea == null)
    {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    }
    else
    {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if(buffer == null)
      {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      }
      else
      {
        buffer.reset();
      }
     
      BufferedLoader loader = workArea.get(BufferedLoader.class);     
      if(loader == null || loader.capacity() < maxdoc)
      {
View Full Code Here

    }
  }

  protected BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea) {
    if (workArea == null) {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    } else {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if (buffer == null) {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      } else {
        buffer.reset();
      }

      BufferedLoader loader = workArea.get(BufferedLoader.class);
      if (loader == null || loader.capacity() < maxdoc) {
        loader = new BufferedLoader(maxdoc, _maxItems, buffer);
View Full Code Here

    }
  }

  protected BufferedLoader getBufferedLoader(int maxdoc, WorkArea workArea) {
    if (workArea == null) {
      return new BufferedLoader(maxdoc, _maxItems, new BigIntBuffer());
    } else {
      BigIntBuffer buffer = workArea.get(BigIntBuffer.class);
      if (buffer == null) {
        buffer = new BigIntBuffer();
        workArea.put(buffer);
      } else {
        buffer.reset();
      }

      BufferedLoader loader = workArea.get(BufferedLoader.class);
      if (loader == null || loader.capacity() < maxdoc) {
        loader = new BufferedLoader(maxdoc, _maxItems, buffer);
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.util.BigIntBuffer

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.