Examples of nextLong()


Examples of java.util.Random.nextLong()

            } else {
                Random rnd = new Random(9);
                int len = ARRAY_TEST_LENGTHS[i-1];
                data = new long[len];
                for (int ix = 0; ix < len; ++ix) {
                    data[ix] = rnd.nextLong();
                }
            }
            String contents;
            if (testAttr) {
                contents = getAttributeContent(writeLongArrayAttrDoc("root", "attr", data));
View Full Code Here

Examples of java.util.Random.nextLong()

                data = new double[len];
                for (int ix = 0; ix < len; ++ix) {
                    // Need to scale: nextDouble is [0.0, 1.0[
                    double value = rnd.nextDouble();
                    if (rnd.nextBoolean()) {
                        value = (value * rnd.nextLong());
                    }
                    if (rnd.nextBoolean()) {
                        value = -value;
                    }
                    data[ix] = value;
View Full Code Here

Examples of java.util.Random.nextLong()

      try{
        //Create User with LdapData
        Long userid;
        if (ldap_sync_passwd_to_om != null && ldap_sync_passwd_to_om.equals("no")){
          Random r = new Random();
          String token = Long.toString(Math.abs(r.nextLong()), 36);
          log.debug("Synching Ldap user to OM DB with RANDOM password: " + token);
          userid = createUserFromLdapData(userData, token, user, ldapAttrs);         
        }
        else{
          log.debug("Synching Ldap user to OM DB with password");
View Full Code Here

Examples of java.util.Random.nextLong()

        repCacheDb.runWriteTransaction(new ISqlJetTransaction() {
            public Object run(SqlJetDb db) throws SqlJetException {
                final Random random = new Random();
                for (int i = 0; i < REPEATS_COUNT; i++) {
                    for (int y = 0; y < REPEATS_COUNT; y++) {
                        final String hash = String.valueOf(Math.abs(random.nextLong()));
                        ISqlJetCursor lookup = table.lookup(table.getPrimaryKeyIndexName(), hash);
                        if (!lookup.first()) {
                            logger.info(i + " " + hash);
                            table.insert(hash, i, i, i, i);
                            break;
View Full Code Here

Examples of java.util.Random.nextLong()

            public Object run(SqlJetDb db) throws SqlJetException {
                final ISqlJetTable table = repCacheDb.getTable(REP_CACHE_TABLE);
                final Random random = new Random();
                for (int i = 0; i < REPEATS_COUNT; i++) {
                    for (int y = 0; y < REPEATS_COUNT; y++) {
                        final String hash = String.valueOf(Math.abs(random.nextLong()));
                        ISqlJetCursor lookup = table.lookup(table.getPrimaryKeyIndexName(), hash);
                        if (!lookup.first()) {
                            logger.info(i + " " + hash);
                            table.insert(hash, i, i, i, i);
                            break;
View Full Code Here

Examples of java.util.Random.nextLong()

                db.createIndex("create index cd on t(c desc)");
                table = db.getTable("t");

                Random r = new Random();
                for (int i = 10; i > 0; i--) {
                    table.insert(null, i, r.nextLong());
                }

                db.createTable("create table t1(a integer, b integer, primary key (a,b))");
                table1 = db.getTable("t1");
                for (int i = 10; i > 0; i--) {
View Full Code Here

Examples of java.util.Random.nextLong()

                }

                db.createTable("create table t1(a integer, b integer, primary key (a,b))");
                table1 = db.getTable("t1");
                for (int i = 10; i > 0; i--) {
                    table1.insert(i, r.nextLong());
                }

                return null;
            }
        });
View Full Code Here

Examples of java.util.Random.nextLong()

      for(int i = 0; i < 100; i++) {
        TestVO test1 = new TestVO();
        test1.setId(new Long(1 + i));
        test1.setBooleanValue(Boolean.TRUE);
        test1.setStringValue("Strange");
        test1.setLongValue(new Long(rnd.nextLong() % 100));
        data.add(test1);
   
        TestVO test2 = new TestVO();
        test2.setId(new Long(2 + i));
        test2.setBooleanValue(Boolean.TRUE);
View Full Code Here

Examples of java.util.Random.nextLong()

   
        TestVO test2 = new TestVO();
        test2.setId(new Long(2 + i));
        test2.setBooleanValue(Boolean.TRUE);
        test2.setStringValue("Peculiar");
        test2.setLongValue(new Long(rnd.nextLong() % 100));
        data.add(test2);
   
        TestVO test3 = new TestVO();
        test3.setId(new Long(3 + i));
        test3.setBooleanValue(Boolean.FALSE);
View Full Code Here

Examples of java.util.Random.nextLong()

   
        TestVO test3 = new TestVO();
        test3.setId(new Long(3 + i));
        test3.setBooleanValue(Boolean.FALSE);
        test3.setStringValue("Queer");
        test3.setLongValue(new Long(rnd.nextLong() % 100));
        data.add(test3);
      }     
    }   

    public List loadData() {
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.