本文整理了Java中org.apache.sis.util.logging.WarningListeners.<init>()
方法的一些代码示例,展示了WarningListeners.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WarningListeners.<init>()
方法的具体详情如下:
包路径:org.apache.sis.util.logging.WarningListeners
类名称:WarningListeners
方法名:<init>
[英]Creates a new instance without source. This constructor is for EmptyWarningListenersusage only, because it requires some method to be overloaded.
[中]创建一个没有源的新实例。此构造函数仅用于EmptyWarningListenersusage,因为它需要重载某些方法。
代码示例来源:origin: apache/sis
/**
* Creates a new instance with no provider and initially no listener.
*/
protected DataStore() {
provider = null;
name = null;
locale = Locale.getDefault(Locale.Category.DISPLAY);
listeners = new WarningListeners<>(this);
}
代码示例来源:origin: org.apache.sis.storage/sis-storage
/**
* Creates a new instance with no provider and initially no listener.
*/
protected DataStore() {
provider = null;
name = null;
locale = Locale.getDefault(Locale.Category.DISPLAY);
listeners = new WarningListeners<>(this);
}
代码示例来源:origin: apache/sis
/**
* Creates a new test case.
*/
public WarningListenersTest() {
listeners = new WarningListeners<>("source");
}
代码示例来源:origin: org.apache.sis.core/sis-metadata
/**
* Creates a new metadata source with the same configuration than the given source.
* The two {@code MetadataSource} instances will share the same {@code DataSource}
* but will use their own {@link Connection}.
* This constructor is useful when concurrency is desired.
*
* <p>The new {@code MetadataSource} initially contains all {@linkplain #addWarningListener warning listeners}
* declared in the given {@code source}. But listeners added or removed in a {@code MetadataSource} after the
* construction will not impact the other {@code MetadataSource} instance.</p>
*
* @param source the source from which to copy the configuration.
*/
public MetadataSource(final MetadataSource source) {
ArgumentChecks.ensureNonNull("source", source);
standard = source.standard;
dataSource = source.dataSource;
catalog = source.catalog;
schema = source.schema;
quoteSchema = source.quoteSchema;
statements = new CachedStatement[source.statements.length];
tableColumns = new HashMap<>();
classloader = source.classloader;
pool = source.pool;
lastUsed = source.lastUsed;
listeners = new WarningListeners<>(this, source.listeners);
}
代码示例来源:origin: apache/sis
/**
* Creates a new metadata source with the same configuration than the given source.
* The two {@code MetadataSource} instances will share the same {@code DataSource}
* but will use their own {@link Connection}.
* This constructor is useful when concurrency is desired.
*
* <p>The new {@code MetadataSource} initially contains all {@linkplain #addWarningListener warning listeners}
* declared in the given {@code source}. But listeners added or removed in a {@code MetadataSource} after the
* construction will not impact the other {@code MetadataSource} instance.</p>
*
* @param source the source from which to copy the configuration.
*/
public MetadataSource(final MetadataSource source) {
ArgumentChecks.ensureNonNull("source", source);
standard = source.standard;
dataSource = source.dataSource;
catalog = source.catalog;
schema = source.schema;
quoteSchema = source.quoteSchema;
statements = new CachedStatement[source.statements.length];
tableColumns = new HashMap<>();
classloader = source.classloader;
pool = source.pool;
lastUsed = source.lastUsed;
listeners = new WarningListeners<>(this, source.listeners);
}
代码示例来源:origin: apache/sis
/**
* Creates a new instance for the given storage (typically file or database).
* The {@code provider} argument is an optional information.
* The {@code connector} argument is mandatory.
*
* @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
* @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
* @throws DataStoreException if an error occurred while creating the data store for the given storage.
*
* @since 0.8
*/
protected DataStore(final DataStoreProvider provider, final StorageConnector connector) throws DataStoreException {
ArgumentChecks.ensureNonNull("connector", connector);
this.provider = provider;
this.name = connector.getStorageName();
this.locale = Locale.getDefault(Locale.Category.DISPLAY);
this.listeners = new WarningListeners<>(this);
/*
* Above locale is NOT OptionKey.LOCALE because we are not talking about the same locale.
* The one in this DataStore is for warning and exception messages, not for parsing data.
*/
}
代码示例来源:origin: org.apache.sis.storage/sis-storage
/**
* Creates a new instance for the given storage (typically file or database).
* The {@code provider} argument is an optional information.
* The {@code connector} argument is mandatory.
*
* @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
* @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
* @throws DataStoreException if an error occurred while creating the data store for the given storage.
*
* @since 0.8
*/
protected DataStore(final DataStoreProvider provider, final StorageConnector connector) throws DataStoreException {
ArgumentChecks.ensureNonNull("connector", connector);
this.provider = provider;
this.name = connector.getStorageName();
this.locale = Locale.getDefault(Locale.Category.DISPLAY);
this.listeners = new WarningListeners<>(this);
/*
* Above locale is NOT OptionKey.LOCALE because we are not talking about the same locale.
* The one in this DataStore is for warning and exception messages, not for parsing data.
*/
}
代码示例来源:origin: apache/sis
/**
* Creates a new instance as a child of another data store instance.
* The new instance inherits the parent {@linkplain #getProvider() provider}.
* The parent and the child share the same listeners: adding or removing a listener to a parent
* adds or removes the same listeners to all children, and conversely.
*
* @param parent the parent data store, or {@code null} if none.
* @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
* @throws DataStoreException if an error occurred while creating the data store for the given storage.
*
* @since 0.8
*/
protected DataStore(final DataStore parent, final StorageConnector connector) throws DataStoreException {
ArgumentChecks.ensureNonNull("connector", connector);
if (parent != null) {
provider = parent.provider;
locale = parent.locale;
listeners = parent.listeners;
} else {
provider = null;
locale = Locale.getDefault(Locale.Category.DISPLAY);
listeners = new WarningListeners<>(this);
}
name = connector.getStorageName();
}
代码示例来源:origin: org.apache.sis.storage/sis-storage
/**
* Creates a new instance as a child of another data store instance.
* The new instance inherits the parent {@linkplain #getProvider() provider}.
* The parent and the child share the same listeners: adding or removing a listener to a parent
* adds or removes the same listeners to all children, and conversely.
*
* @param parent the parent data store, or {@code null} if none.
* @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
* @throws DataStoreException if an error occurred while creating the data store for the given storage.
*
* @since 0.8
*/
protected DataStore(final DataStore parent, final StorageConnector connector) throws DataStoreException {
ArgumentChecks.ensureNonNull("connector", connector);
if (parent != null) {
provider = parent.provider;
locale = parent.locale;
listeners = parent.listeners;
} else {
provider = null;
locale = Locale.getDefault(Locale.Category.DISPLAY);
listeners = new WarningListeners<>(this);
}
name = connector.getStorageName();
}
代码示例来源:origin: org.apache.sis.core/sis-metadata
this.tableColumns = new HashMap<>();
this.pool = new WeakValueHashMap<>(CacheKey.class);
this.listeners = new WarningListeners<>(this);
this.lastUsed = new ThreadLocal<LookupInfo>() {
@Override protected LookupInfo initialValue() {
代码示例来源:origin: apache/sis
this.tableColumns = new HashMap<>();
this.pool = new WeakValueHashMap<>(CacheKey.class);
this.listeners = new WarningListeners<>(this);
this.lastUsed = ThreadLocal.withInitial(LookupInfo::new);
内容来源于网络,如有侵权,请联系作者删除!