Examples of supportedOptions()


Examples of java.nio.channels.NetworkChannel.supportedOptions()

    try {
      NetworkChannel socketChannel = provider.openSocketChannel();
      SocketAddress address = new InetSocketAddress(3080);
      socketChannel = socketChannel.bind(address);

      Set<SocketOption<?>> socketOptions = socketChannel.supportedOptions();

      System.out.println(socketOptions.toString());
      socketChannel.setOption(StandardSocketOptions.IP_TOS, 3);
      Boolean keepAlive = socketChannel
          .getOption(StandardSocketOptions.SO_KEEPALIVE);
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

        {
            throw new JDOUnsupportedOptionException("Cannot change the transaction isolation level while a datastore transaction is active");
        }

        PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
        if (!pmf.supportedOptions().contains("javax.jdo.option.TransactionIsolationLevel." + level))
        {
            throw new JDOUnsupportedOptionException("Isolation level \"" + level + "\" not supported by this datastore");
        }

        int isolationLevel = TransactionUtils.getTransactionIsolationLevelForName(level);
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

    /** */
    public void test() {
        PersistenceManagerFactory pmf = getPMF();
        if (debug) logger.debug("Options supported by this implementation:");
        Collection c = pmf.supportedOptions();
        Iterator iter = c.iterator();
        while( iter.hasNext() ){
            String option = (String) iter.next();
            if (debug) logger.debug(option);
        }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

            System.exit(-1);
        }
        String PMFclassname = args[0];
        Class PMFclass = Class.forName(PMFclassname);
        PersistenceManagerFactory pmf = (PersistenceManagerFactory) PMFclass.newInstance();
        Collection options = pmf.supportedOptions();
        System.out.println("Supported options are:");
        Iterator iter = options.iterator();
        while( iter.hasNext() ){
            String val = (String) iter.next();
            System.out.println(val);       
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

    /** */
    public void test() {
        PersistenceManagerFactory pmf = getPMF();
        if (debug) logger.debug("Options supported by this implementation:");
        Collection c = pmf.supportedOptions();
        Iterator iter = c.iterator();
        while( iter.hasNext() ){
            String option = (String) iter.next();
            if (debug) logger.debug(option);
        }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

            System.exit(-1);
        }
        String PMFclassname = args[0];
        Class PMFclass = Class.forName(PMFclassname);
        PersistenceManagerFactory pmf = (PersistenceManagerFactory) PMFclass.newInstance();
        Collection options = pmf.supportedOptions();
        System.out.println("Supported options are:");
        Iterator iter = options.iterator();
        while( iter.hasNext() ){
            String val = (String) iter.next();
            System.out.println(val);       
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory.supportedOptions()

        {
            throw new JDOUnsupportedOptionException("Cannot change the transaction isolation level while a datastore transaction is active");
        }

        PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
        if (!pmf.supportedOptions().contains("javax.jdo.option.TransactionIsolationLevel." + level))
        {
            throw new JDOUnsupportedOptionException("Isolation level \"" + level + "\" not supported by this datastore");
        }

        int isolationLevel = TransactionUtils.getTransactionIsolationLevelForName(level);
View Full Code Here

Examples of org.apache.cassandra.thrift.ITransportFactory.supportedOptions()

    private ITransportFactory getClientTransportFactory(String factoryClassName)
    {
        try {
            ITransportFactory factory = (ITransportFactory) Class.forName(factoryClassName).newInstance();
            Map<String, String> options = getOptions(factory.supportedOptions());
            factory.setOptions(options);
            return factory;
        }
        catch (Exception e) {
            throw new RuntimeException("Failed to instantiate transport factory:" + factoryClassName, e);
View Full Code Here

Examples of org.apache.openjpa.conf.OpenJPAConfiguration.supportedOptions()

            storeProps);

        // populate configuration
        OpenJPAConfiguration conf = store.newConfiguration();
        cp.setInto(conf);
        conf.supportedOptions().removeAll(store.getUnsupportedOptions());

        // create and pool a new factory
        return new AbstractStoreBrokerFactory(conf, storeCls, storeProps,
            store.getPlatform());
    }
View Full Code Here

Examples of org.apache.openjpa.conf.OpenJPAConfiguration.supportedOptions()

     * Validate that this field is supported by the runtime.
     */
    private void validateSupportedType() {
        // log warnings about things we don't handle
        OpenJPAConfiguration conf = getRepository().getConfiguration();
        Collection<String> opts = conf.supportedOptions();
        Log log = conf.getLog(OpenJPAConfiguration.LOG_METADATA);
        switch (getTypeCode()) {
            case JavaTypes.PC:
                if (isEmbedded() && !opts.contains(
                  OpenJPAConfiguration.OPTION_EMBEDDED_RELATION)) {
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.