Examples of reserve()


Examples of Common.BoolVector.Reserve()

                    emptyStreamVector.setBoolVector(this.inStream.ReadBoolVector(numFiles));
                    for (int i=0; i<emptyStreamVector.size(); i++)
                        if (emptyStreamVector.get(i))
                            numEmptyStreams++;
                    emptyFileVector.Reserve(numEmptyStreams);
                    antiFileVector.Reserve(numEmptyStreams);
                    for (int i = 0; i < numEmptyStreams; i++) {
                        emptyFileVector.add(false);
                        antiFileVector.add(false);
                    }
                    break;
View Full Code Here

Examples of Common.IntVector.Reserve()

        int numItems,
            BoolVector digestsDefined) throws IOException {
        digestsDefined.setBoolVector(ReadBoolVector2(numItems));
        final IntVector digests = new IntVector(numItems);
        digests.clear();
        digests.Reserve(numItems);
        for (int i=0; i<numItems; i++) {
            int crc = 0;
            if (digestsDefined.get(i))
                crc = ReadUInt32();
            digests.add(crc);
View Full Code Here

Examples of Common.LongVector.Reserve()

      int numInStreams = coderInfo.NumInStreams;
      int numOutStreams = coderInfo.NumOutStreams;
      LongVector packSizesPointers = new LongVector(); // CRecordVector<const UInt64 *>
      LongVector unPackSizesPointers = new LongVector(); // CRecordVector<const UInt64 *>
      packSizesPointers.Reserve(numInStreams);
      unPackSizesPointers.Reserve(numOutStreams);
      int j;
     
      for (j=0; j<numOutStreams; j++, unPackStreamIndex++)
        unPackSizesPointers.add(folderInfo.UnPackSizes.get(unPackStreamIndex));
      
View Full Code Here

Examples of com.cloud.network.guru.NetworkGuru.reserve()

            URI isolationUri = nic.getIsolationUri();

            profile = new NicProfile(nic, network, broadcastUri, isolationUri,

            networkRate, isSecurityGroupSupportedInNetwork(network), getNetworkTag(vmProfile.getHypervisorType(), network));
            guru.reserve(profile, network, vmProfile, dest, context);
            nic.setIp4Address(profile.getIp4Address());
            nic.setAddressFormat(profile.getFormat());
            nic.setIp6Address(profile.getIp6Address());
            nic.setMacAddress(profile.getMacAddress());
            nic.setIsolationUri(profile.getIsolationUri());
View Full Code Here

Examples of com.surftools.BeanstalkClient.Client.reserve()

        client.useTube((String) tubeNames[1]);
        long jobId = client.put(65536, 0, 120, srcString.getBytes());
        assertTrue(jobId > 0);

        // consumer
        Job job = client.reserve(null);
        assertNotNull(job);
        long newJobId = job.getJobId();
        assertEquals(jobId, newJobId);

        String dstString = new String(job.getData());
View Full Code Here

Examples of com.trendrr.beanstalk.BeanstalkClient.reserve()

   */
  public static void clientExample() throws BeanstalkException {
    BeanstalkClient client = new BeanstalkClient("localhost", 8010, "example");
    log.info("Putting a job");
    client.put(1l, 0, 5000, "this is some data".getBytes());
    BeanstalkJob job = client.reserve(60);
    log.info("GOt job: " + job);
    client.deleteJob(job);
    client.close(); //closes the connection
  }
 
View Full Code Here

Examples of org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity.reserve()

            } else {
                plannerName = _configDao.getValue(Config.VmDeploymentPlanner.key());
            }
        }

        String reservationId = vmEntity.reserve(plannerName, plan, new ExcludeList(), new Long(callerUser.getId()).toString());
        vmEntity.deploy(reservationId, new Long(callerUser.getId()).toString(), params);

        Pair<UserVmVO, Map<VirtualMachineProfile.Param, Object>> vmParamPair = new Pair(vm, params);
        if (vm != null && vm.isUpdateParameters()) {
            // this value is not being sent to the backend; need only for api
View Full Code Here

Examples of org.dspace.identifier.IdentifierService.reserve()

            copyMetadata(itemNew, previousItem);
            createBundlesAndAddBitstreams(c, itemNew, previousItem);
            IdentifierService identifierService = new DSpace().getSingletonService(IdentifierService.class);
            try
            {
                identifierService.reserve(c, itemNew);
            } catch (IdentifierException e) {
                throw new RuntimeException("Can't create Identifier!");
            }
            itemNew.update();
            return itemNew;
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AESemaphore.reserve()

            }
          }
         
          while( pending_check_num > 0 ){
           
            pending_checks_sem.reserve();
           
            pending_check_num--;
          }
         
          if ( partialPieces != null ){
View Full Code Here

Examples of org.gudy.azureus2.core3.util.AESemaphore.reserve()

            }
          }
         
          while( pending_check_num > 0 ){
           
            pending_checks_sem.reserve();
           
            pending_check_num--;
          }
        }
       
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.