/** * Return a new factory for the default configuration. */ public static BrokerFactory newBrokerFactory() { return Bootstrap.newBrokerFactory(null, null); }
/** * Return a new factory for the default configuration. */ public static BrokerFactory newBrokerFactory() { return Bootstrap.newBrokerFactory(null, null); }
/** * Return a new factory for the default configuration. */ public static BrokerFactory newBrokerFactory() { return Bootstrap.newBrokerFactory(null, null); }
/** * Return a new factory for the default configuration. */ public static BrokerFactory newBrokerFactory() { return Bootstrap.newBrokerFactory(null, null); }
/** * Return a new factory for the default configuration. */ public static BrokerFactory newBrokerFactory() { return Bootstrap.newBrokerFactory(null, null); }
private BrokerFactory getBrokerFactory(ConfigurationProvider cp, Object poolValue, ClassLoader loader) { // handle "true" and "false" if (poolValue instanceof String && ("true".equalsIgnoreCase((String) poolValue) || "false".equalsIgnoreCase((String) poolValue))) poolValue = Boolean.valueOf((String) poolValue); if (poolValue != null && !(poolValue instanceof Boolean)) { // we only support boolean settings for this option currently. throw new IllegalArgumentException(poolValue.toString()); } if (poolValue == null || !((Boolean) poolValue).booleanValue()) return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); }
private BrokerFactory getBrokerFactory(ConfigurationProvider cp, Object poolValue, ClassLoader loader) { // handle "true" and "false" if (poolValue instanceof String && ("true".equalsIgnoreCase((String) poolValue) || "false".equalsIgnoreCase((String) poolValue))) poolValue = Boolean.valueOf((String) poolValue); if (poolValue != null && !(poolValue instanceof Boolean)) { // we only support boolean settings for this option currently. throw new IllegalArgumentException(poolValue.toString()); } if (poolValue == null || !((Boolean) poolValue).booleanValue()) return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); }
private BrokerFactory getBrokerFactory(ConfigurationProvider cp, Object poolValue, ClassLoader loader) { // handle "true" and "false" if (poolValue instanceof String && ("true".equalsIgnoreCase((String) poolValue) || "false".equalsIgnoreCase((String) poolValue))) poolValue = Boolean.valueOf((String) poolValue); if (poolValue != null && !(poolValue instanceof Boolean)) { // we only support boolean settings for this option currently. throw new IllegalArgumentException(poolValue.toString()); } if (poolValue == null || !((Boolean) poolValue).booleanValue()) return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); }
private BrokerFactory getBrokerFactory(ConfigurationProvider cp, Object poolValue, ClassLoader loader) { // handle "true" and "false" if (poolValue instanceof String && ("true".equalsIgnoreCase((String) poolValue) || "false".equalsIgnoreCase((String) poolValue))) poolValue = Boolean.valueOf((String) poolValue); if (poolValue != null && !(poolValue instanceof Boolean)) { // we only support boolean settings for this option currently. throw new IllegalArgumentException(poolValue.toString()); } if (poolValue == null || !((Boolean) poolValue).booleanValue()) return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); }
private BrokerFactory getBrokerFactory(ConfigurationProvider cp, Object poolValue, ClassLoader loader) { // handle "true" and "false" if (poolValue instanceof String && ("true".equalsIgnoreCase((String) poolValue) || "false".equalsIgnoreCase((String) poolValue))) poolValue = Boolean.valueOf((String) poolValue); if (poolValue != null && !(poolValue instanceof Boolean)) { // we only support boolean settings for this option currently. throw new IllegalArgumentException(poolValue.toString()); } if (poolValue == null || !((Boolean) poolValue).booleanValue()) return Bootstrap.newBrokerFactory(cp, loader); else return Bootstrap.getBrokerFactory(cp, loader); }
/** * Factory method for obtaining a possibly-pooled factory from properties. * Invoked from {@link Bootstrap#getBrokerFactory}. */ public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader) { Map<String, Object> props = cp.getProperties(); Object key = toPoolKey(props); JDBCBrokerFactory factory = (JDBCBrokerFactory) getPooledFactoryForKey(key); if (factory != null) return factory; // The creation of all BrokerFactories should be driven through Bootstrap. factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp, loader); pool(key, factory); return factory; }
/** * Factory method for obtaining a possibly-pooled factory from properties. * Invoked from {@link Bootstrap#getBrokerFactory}. */ public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader) { Map<String, Object> props = cp.getProperties(); Object key = toPoolKey(props); JDBCBrokerFactory factory = (JDBCBrokerFactory) getPooledFactoryForKey(key); if (factory != null) return factory; // The creation of all BrokerFactories should be driven through Bootstrap. factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp, loader); pool(key, factory); return factory; }
/** * Factory method for obtaining a possibly-pooled factory from properties. * Invoked from {@link Bootstrap#getBrokerFactory}. */ public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader) { Map<String, Object> props = cp.getProperties(); Object key = toPoolKey(props); JDBCBrokerFactory factory = (JDBCBrokerFactory) getPooledFactoryForKey(key); if (factory != null) return factory; // The creation of all BrokerFactories should be driven through Bootstrap. factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp, loader); pool(key, factory); return factory; }
/** * Factory method for obtaining a possibly-pooled factory from properties. * Invoked from {@link Bootstrap#getBrokerFactory}. */ public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader) { Map<String, Object> props = cp.getProperties(); Object key = toPoolKey(props); JDBCBrokerFactory factory = (JDBCBrokerFactory) getPooledFactoryForKey(key); if (factory != null) return factory; // The creation of all BrokerFactories should be driven through Bootstrap. factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp, loader); pool(key, factory); return factory; }
public static void main(String[] args) { Options opts = new Options(); args = opts.setFromCmdLine(args); boolean devpath = opts.getBooleanProperty("scanDevPath", "ScanDevPath", true); ConfigurationProvider cp = new MapConfigurationProvider(opts); BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null); try { MetaDataCacheMaintenance maint = new MetaDataCacheMaintenance( factory, devpath); if (args.length != 1) { usage(); return; } if ("store".equals(args[0])) maint.store(); else if ("dump".equals(args[0])) maint.dump(); else usage(); } finally { factory.close(); } }
public static void main(String[] args) { Options opts = new Options(); args = opts.setFromCmdLine(args); boolean devpath = opts.getBooleanProperty("scanDevPath", "ScanDevPath", true); ConfigurationProvider cp = new MapConfigurationProvider(opts); BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null); try { MetaDataCacheMaintenance maint = new MetaDataCacheMaintenance( factory, devpath); if (args.length != 1) { usage(); return; } if ("store".equals(args[0])) maint.store(); else if ("dump".equals(args[0])) maint.dump(); else usage(); } finally { factory.close(); } }
public static void main(String[] args) { Options opts = new Options(); args = opts.setFromCmdLine(args); boolean devpath = opts.getBooleanProperty("scanDevPath", "ScanDevPath", true); ConfigurationProvider cp = new MapConfigurationProvider(opts); BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null); try { MetaDataCacheMaintenance maint = new MetaDataCacheMaintenance( factory, devpath); if (args.length != 1) { usage(); return; } if ("store".equals(args[0])) maint.store(); else if ("dump".equals(args[0])) maint.dump(); else usage(); } finally { factory.close(); } }
public static void main(String[] args) { Options opts = new Options(); args = opts.setFromCmdLine(args); boolean devpath = opts.getBooleanProperty("scanDevPath", "ScanDevPath", true); ConfigurationProvider cp = new MapConfigurationProvider(opts); BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null); try { MetaDataCacheMaintenance maint = new MetaDataCacheMaintenance( factory, devpath); if (args.length != 1) { usage(); return; } if ("store".equals(args[0])) maint.store(); else if ("dump".equals(args[0])) maint.dump(); else usage(); } finally { factory.close(); } }
public static void main(String[] args) { Options opts = new Options(); args = opts.setFromCmdLine(args); boolean devpath = opts.getBooleanProperty("scanDevPath", "ScanDevPath", true); ConfigurationProvider cp = new MapConfigurationProvider(opts); BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null); try { MetaDataCacheMaintenance maint = new MetaDataCacheMaintenance( factory, devpath); if (args.length != 1) { usage(); return; } if ("store".equals(args[0])) maint.store(); else if ("dump".equals(args[0])) maint.dump(); else usage(); } finally { factory.close(); } }