Examples of nextInt()


Examples of java.util.Random.nextInt()

    ByteBuffer dBuffer = ByteBuffer.allocateDirect(BUFF_MAX_SIZE);
    ByteBuffer hBuffer = ByteBuffer.allocate(BUFF_MAX_SIZE);

    for (int i = 0; i < BUFF_MAX_SIZE; i++)
    {
      byte b = (byte) (rnd.nextInt()&0xFF);
      dBuffer.put(b);
    }
   
    dBuffer.rewind();
    hBuffer.put(dBuffer);
View Full Code Here

Examples of java.util.Random.nextInt()

    ByteBuffer dview;
    ByteBuffer hview;
   
    for(int i=0;i<LOOPS[1]/TEST_SPEED_FACTOR;i++)
    {
      size = rnd.nextInt(BUFF_MAX_SIZE);
      offset = rnd.nextInt(BUFF_MAX_SIZE-size-1);
     
      hBuffer.limit(offset+size);
      hBuffer.position(offset);
      dBuffer.limit(offset+size);
View Full Code Here

Examples of java.util.Random.nextInt()

    ByteBuffer hview;
   
    for(int i=0;i<LOOPS[1]/TEST_SPEED_FACTOR;i++)
    {
      size = rnd.nextInt(BUFF_MAX_SIZE);
      offset = rnd.nextInt(BUFF_MAX_SIZE-size-1);
     
      hBuffer.limit(offset+size);
      hBuffer.position(offset);
      dBuffer.limit(offset+size);
      dBuffer.position(offset);
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  Fqn f = singleFqn ? fqn : fqns.get(r.nextInt(fqns.size()));
                  cache1.evict(f);
                  TestingUtil.sleepRandom(50);
               }
            }
            catch (TimeoutException te)
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  Fqn f = singleFqn ? fqn : fqns.get(r.nextInt(fqns.size()));
                  cache2.put(f, "k", "v");
                  TestingUtil.sleepRandom(50);
               }
            }
            catch (Exception e)
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  loader1.get(singleFqn ? fqn : fqns.get(r.nextInt(fqns.size())));
                  TestingUtil.sleepRandom(50);
               }
            }
            catch (Exception e)
            {
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  loader1.getChildrenNames(singleFqn ? fqn.getParent() : fqns.get(r.nextInt(fqns.size())).getParent());
                  TestingUtil.sleepRandom(50);
               }
            }
            catch (Exception e)
            {
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  loader1.getChildrenNames(singleFqn ? fqn : fqns.get(r.nextInt(fqns.size())));
                  TestingUtil.sleepRandom(50);
               }
            }
            catch (Exception e)
            {
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  loader.remove(singleFqn ? fqn : fqns.get(r.nextInt(fqns.size())));
               }
            }
            catch (Exception e)
            {
               exceptions.add(e);
View Full Code Here

Examples of java.util.Random.nextInt()

            try
            {
               latch.await();
               for (int i = 0; i < loops; i++)
               {
                  loader.remove(singleFqn ? fqn : fqns.get(r.nextInt(fqns.size())), "k");
               }
            }
            catch (Exception e)
            {
               exceptions.add(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.