Examples of allocate()


Examples of com.orientechnologies.common.directmemory.ODirectMemory.allocate()

    final Random rnd = new Random();
    ODirectMemory directMemory = new OJNADirectMemory();

    long value = rnd.nextLong();

    long pointer = directMemory.allocate(OLongSerializer.LONG_SIZE);
    directMemory.setLong(pointer, value);

    Assert.assertEquals(directMemory.getLong(pointer), value);

    directMemory.free(pointer);
View Full Code Here

Examples of com.sun.grizzly.util.buf.CharChunk.allocate()

            throws Exception {

        ByteChunk bc = uri.getByteChunk();
        CharChunk cc = uri.getCharChunk();
        int length = bc.getLength();
        cc.allocate(length, -1);

        String enc = connector.getURIEncoding();
        if (enc != null && !enc.isEmpty() &&
                !Globals.ISO_8859_1_ENCODING.equalsIgnoreCase(enc)) {
            B2CConverter conv = getURIConverter();
View Full Code Here

Examples of com.sun.messaging.jmq.io.VRFileRAF.allocate()

                    vrecord.rewind();
                    byte data[] = new byte[INT_SIZE+packetSize];
                    vrecord.read(data);

                    // the existing one is not big enough; get another one
                    VRecordRAF newrecord = (VRecordRAF)vrfile.allocate(total);

                    // copy message
                    newrecord.write(data);

                    // free old
View Full Code Here

Examples of com.sun.speech.freetts.Voice.allocate()

        System.err.println("Cannot find voices");
        for(Voice voice : voiceManager.getVoices()) {
          System.out.println("Voice: " + voice.getName());
        }
      }
      helloVoice.allocate();
      this.voice = helloVoice;
    }
    return this.voice;
  }
}
View Full Code Here

Examples of com.vmware.bdd.placement.entity.AbstractDatacenter.AbstractDatastore.allocate()

         replacement.setTargetDs(ads.getName());
         replacement.setVmdkPath(null);
         replacements.add(replacement);

         // deduct space
         ads.allocate(requiredSize);
         // increase reference by 1
         usage.put(ads, usage.get(ads) + 1);
      }

      return replacements;
View Full Code Here

Examples of edu.cmu.sphinx.linguist.dictionary.Dictionary.allocate()

                                                        false,
                                                        1.0f,
                                                        1.0f,
                                                        1.0f,
                                                        false);
        dictionary.allocate();
        model.allocate();
        assertThat(model.getMaxDepth(), equalTo(3));

        Word[] words = {
            new Word("huggins", null, false),
View Full Code Here

Examples of edu.cmu.sphinx.linguist.dictionary.FullDictionary.allocate()

                                                        false,
                                                        1.0f,
                                                        1.0f,
                                                        1.0f,
                                                        false);
        dictionary.allocate();
        model.allocate();
        assertThat(model.getMaxDepth(), equalTo(3));

        Word[] words = {
            new Word("huggins", null, false),
View Full Code Here

Examples of edu.cmu.sphinx.recognizer.Recognizer.allocate()

    } else {
      cm = new ConfigurationManager(HarryPotter.class.getResource("harry.config.xml"));
    }

    final Recognizer recognizer = (Recognizer) cm.lookup("recognizer");
    recognizer.allocate();

    // start the microphone or exit if the programm if this is not possible
    Microphone microphone = (Microphone) cm.lookup("microphone");
    if (!microphone.startRecording()) {
      System.out.println("Cannot start microphone.");
View Full Code Here

Examples of javax.jdo.datastore.Sequence.allocate()

    for (int i  = 0; i< COMPARE_NUMBER; i++) {
      s.next();
    }
    timeToGetManyNext = System.currentTimeMillis() - timeToGetManyNext;
    long timeToGetManyAllocate = System.currentTimeMillis();
    s.allocate(COMPARE_NUMBER);
    for (int i  = 0; i< COMPARE_NUMBER; i++) {
      s.next();
    }
    timeToGetManyAllocate = System.currentTimeMillis() - timeToGetManyAllocate;
    logger.log(BasicLevel.DEBUG, COMPARE_NUMBER + " ids generated:\nwith allocate: " + timeToGetManyAllocate
View Full Code Here

Examples of javax.speech.synthesis.Synthesizer.allocate()

    System.exit(1);
      }

      /* Get the synthesizer ready to speak
             */
      synthesizer.allocate();
      synthesizer.resume();

            /* Choose the voice.
             */
            desc = (SynthesizerModeDesc) synthesizer.getEngineModeDesc();
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.