Examples of Locations


Examples of org.apache.xmlbeans.impl.newstore2.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations( this );

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption( XmlOptions.VALIDATE_ON_SET );
       
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations(this);

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
       
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations(this);

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
       
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations(this);

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
       
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory();

        _locations = new Locations(this);

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
       
View Full Code Here

Examples of org.apache.xmlbeans.impl.store.Cur.Locations

        // Lazy create this (loading up a locale should use the thread locale one)
        // same goes for the qname factory .. use thread local for hte most part when loading
       
        _qnameFactory = new DefaultQNameFactory(); //new LocalDocumentQNameFactory();

        _locations = new Locations(this);

        _schemaTypeLoader = stl;

        _validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
       
View Full Code Here

Examples of org.hive2hive.core.model.Locations

    NetworkContent loadedContent = get(userId, H2HConstants.USER_LOCATIONS);

    if (loadedContent == null) {
      context.provideLocations(null);
    } else {
      Locations locations = (Locations) loadedContent;
      if (!locations.getUserId().equalsIgnoreCase(userId))
        throw new ProcessExecutionException(String.format(
            "The wrong locations have been loaded. Required: %s. Got: %s.", userId,
            locations.getUserId()));

      context.provideLocations(locations);
    }
  }
View Full Code Here

Examples of org.hive2hive.core.model.Locations

    this.protectionKeyContext = protectionKeyContext;
  }

  @Override
  protected void doExecute() throws InvalidProcessStateException, ProcessExecutionException {
    Locations locations = locationsContext.consumeLocations();

    locations.setBasedOnKey(locations.getVersionKey());
    try {
      locations.generateVersionKey();
    } catch (IOException e) {
      throw new ProcessExecutionException("Could not generate version key.", e);
    }

    try {
      put(locations.getUserId(), H2HConstants.USER_LOCATIONS, locations,
          protectionKeyContext.consumeProtectionKeys());
    } catch (PutFailedException e) {
      throw new ProcessExecutionException(e);
    }
  }
View Full Code Here

Examples of org.hive2hive.core.model.Locations

   * @throws NoSessionException
   * @throws NoPeerConnectionException
   */
  @Test
  public void allClientsAreAlive() throws NoSessionException, NoPeerConnectionException {
    Locations fakedLocations = new Locations(userId);
    fakedLocations.addPeerAddress(network.get(0).getConnection().getPeer().getPeerAddress());
    // responding nodes
    fakedLocations.addPeerAddress(network.get(1).getConnection().getPeer().getPeerAddress());
    fakedLocations.addPeerAddress(network.get(2).getConnection().getPeer().getPeerAddress());
    fakedLocations.addPeerAddress(network.get(3).getConnection().getPeer().getPeerAddress());

    Locations result = runProcessStep(fakedLocations,
        isInitialClient(fakedLocations, network.get(0).getConnection().getPeer().getPeerAddress()));

    assertEquals(4, result.getPeerAddresses().size());
    PeerAddress newClientsEntry = null;
    for (PeerAddress address : result.getPeerAddresses()) {
      if (address.equals(network.get(0).getConnection().getPeer().getPeerAddress())) {
        newClientsEntry = address;
        break;
      }
    }
View Full Code Here

Examples of org.hive2hive.core.model.Locations

    NetworkManager getter = network.get(0); // where the process runs
    NetworkManager proxy = network.get(1); // where the user profile is stored

    // create the needed objects
    String userId = proxy.getNodeId();
    Locations newLocations = new Locations(userId);
    newLocations.addPeerAddress(getter.getConnection().getPeer().getPeerAddress());

    // put the locations to the DHT
    proxy.getDataManager()
        .putUnblocked(
            new Parameters().setLocationKey(userId).setContentKey(H2HConstants.USER_LOCATIONS)
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.