Examples of readPolicy()


Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

      // config wants the timeout in seconds
      config.deadline(query.getDatastoreReadTimeoutMillis() / 1000);
    }
    Map extensions = query.getExtensions();
    if (extensions != null && extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY) != null) {
      config.readPolicy(new ReadPolicy(
          ReadPolicy.Consistency.valueOf((String) extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY))));
    }
    DatastoreService ds = DatastoreServiceFactoryInternal.getDatastoreService(config);

    // Execute the most appropriate type of query
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

    }
    String defaultReadConsistencyStr = persistenceConfiguration.getStringProperty(
        DATASTORE_READ_CONSISTENCY_PROPERTY);
    if (defaultReadConsistencyStr != null) {
      try {
        datastoreServiceConfig.readPolicy(new ReadPolicy(Consistency.valueOf(defaultReadConsistencyStr)));
      } catch (IllegalArgumentException iae) {
        throw new NucleusFatalUserException(
            "Illegal value for " + DATASTORE_READ_CONSISTENCY_PROPERTY +
            ".  Valid values are " + Arrays.toString(Consistency.values()));
      }
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

    }
    String defaultReadConsistencyStr = persistenceConfiguration.getStringProperty(
        DATASTORE_READ_CONSISTENCY_PROPERTY);
    if (defaultReadConsistencyStr != null) {
      try {
        datastoreServiceConfig.readPolicy(new ReadPolicy(Consistency.valueOf(defaultReadConsistencyStr)));
      } catch (IllegalArgumentException iae) {
        throw new FatalNucleusUserException(
            "Illegal value for " + DATASTORE_READ_CONSISTENCY_PROPERTY +
            ".  Valid values are " + Arrays.toString(Consistency.values()));
      }
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

    }
    String defaultReadConsistencyStr = persistenceConfiguration.getStringProperty(
        DATASTORE_READ_CONSISTENCY_PROPERTY);
    if (defaultReadConsistencyStr != null) {
      try {
        datastoreServiceConfig.readPolicy(new ReadPolicy(Consistency.valueOf(defaultReadConsistencyStr)));
      } catch (IllegalArgumentException iae) {
        throw new FatalNucleusUserException(
            "Illegal value for " + DATASTORE_READ_CONSISTENCY_PROPERTY +
            ".  Valid values are " + Arrays.toString(Consistency.values()));
      }
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

      // config wants the timeout in seconds
      config.deadline(query.getTimeoutMillis() / 1000);
    }
    Map extensions = query.getExtensions();
    if (extensions != null && extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY) != null) {
      config.readPolicy(new ReadPolicy(
          ReadPolicy.Consistency.valueOf((String) extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY))));
    }
    DatastoreService ds = DatastoreServiceFactoryInternal.getDatastoreService(config);
    // Txns don't get started until you allocate a connection, so allocate a
    // connection before we do anything that might require a txn.
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

        config.maxEntityGroupsPerRpc(2);
        assertEquals(new Integer(2), config.getMaxEntityGroupsPerRpc());

        config = DatastoreServiceConfig.Builder.withReadPolicy(new ReadPolicy(Consistency.EVENTUAL));
        assertEquals(new ReadPolicy(Consistency.EVENTUAL).getConsistency(), config.getReadPolicy().getConsistency());
        config.readPolicy(new ReadPolicy(Consistency.STRONG));
        assertEquals(new ReadPolicy(Consistency.STRONG).getConsistency(), config.getReadPolicy().getConsistency());
    }

    @Test(expected = ApiDeadlineExceededException.class)
    public void testDeadlineConfig() {
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

    }
    String defaultReadConsistencyStr = persistenceConfiguration.getStringProperty(
        DATASTORE_READ_CONSISTENCY_PROPERTY);
    if (defaultReadConsistencyStr != null) {
      try {
        datastoreServiceConfig.readPolicy(new ReadPolicy(Consistency.valueOf(defaultReadConsistencyStr)));
      } catch (IllegalArgumentException iae) {
        throw new FatalNucleusUserException(
            "Illegal value for " + DATASTORE_READ_CONSISTENCY_PROPERTY +
            ".  Valid values are " + Arrays.toString(Consistency.values()));
      }
View Full Code Here

Examples of com.google.appengine.api.datastore.DatastoreServiceConfig.readPolicy()

      // config wants the timeout in seconds
      config.deadline(query.getTimeoutMillis() / 1000);
    }
    Map extensions = query.getExtensions();
    if (extensions != null && extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY) != null) {
      config.readPolicy(new ReadPolicy(
          ReadPolicy.Consistency.valueOf((String) extensions.get(DatastoreManager.DATASTORE_READ_CONSISTENCY_PROPERTY))));
    }
    DatastoreService ds = DatastoreServiceFactoryInternal.getDatastoreService(config);
    // Txns don't get started until you allocate a connection, so allocate a
    // connection before we do anything that might require a txn.
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader.readPolicy()

           {
              try
              {
                      // first try to load it as a URL
                      URL url = new URL(str);
                      policy = reader.readPolicy(url);
               }
               catch (MalformedURLException murle)
               {
                      // assume that this is a filename, and try again
                      policy = reader.readPolicy(new File(str));
View Full Code Here

Examples of com.sun.xacml.support.finder.PolicyReader.readPolicy()

                      policy = reader.readPolicy(url);
               }
               catch (MalformedURLException murle)
               {
                      // assume that this is a filename, and try again
                      policy = reader.readPolicy(new File(str));
               }
           }
           catch (ParsingException e)
           {
              this.encounteredParsingException = true;
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.