org.apache.sis.util.logging.WarningListeners.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(149)

本文整理了Java中org.apache.sis.util.logging.WarningListeners.<init>()方法的一些代码示例,展示了WarningListeners.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WarningListeners.<init>()方法的具体详情如下:
包路径:org.apache.sis.util.logging.WarningListeners
类名称:WarningListeners
方法名:<init>

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

  1. /**
  2. * Creates a new instance with no provider and initially no listener.
  3. */
  4. protected DataStore() {
  5. provider = null;
  6. name = null;
  7. locale = Locale.getDefault(Locale.Category.DISPLAY);
  8. listeners = new WarningListeners<>(this);
  9. }

代码示例来源:origin: org.apache.sis.storage/sis-storage

  1. /**
  2. * Creates a new instance with no provider and initially no listener.
  3. */
  4. protected DataStore() {
  5. provider = null;
  6. name = null;
  7. locale = Locale.getDefault(Locale.Category.DISPLAY);
  8. listeners = new WarningListeners<>(this);
  9. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates a new test case.
  3. */
  4. public WarningListenersTest() {
  5. listeners = new WarningListeners<>("source");
  6. }

代码示例来源:origin: org.apache.sis.core/sis-metadata

  1. /**
  2. * Creates a new metadata source with the same configuration than the given source.
  3. * The two {@code MetadataSource} instances will share the same {@code DataSource}
  4. * but will use their own {@link Connection}.
  5. * This constructor is useful when concurrency is desired.
  6. *
  7. * <p>The new {@code MetadataSource} initially contains all {@linkplain #addWarningListener warning listeners}
  8. * declared in the given {@code source}. But listeners added or removed in a {@code MetadataSource} after the
  9. * construction will not impact the other {@code MetadataSource} instance.</p>
  10. *
  11. * @param source the source from which to copy the configuration.
  12. */
  13. public MetadataSource(final MetadataSource source) {
  14. ArgumentChecks.ensureNonNull("source", source);
  15. standard = source.standard;
  16. dataSource = source.dataSource;
  17. catalog = source.catalog;
  18. schema = source.schema;
  19. quoteSchema = source.quoteSchema;
  20. statements = new CachedStatement[source.statements.length];
  21. tableColumns = new HashMap<>();
  22. classloader = source.classloader;
  23. pool = source.pool;
  24. lastUsed = source.lastUsed;
  25. listeners = new WarningListeners<>(this, source.listeners);
  26. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates a new metadata source with the same configuration than the given source.
  3. * The two {@code MetadataSource} instances will share the same {@code DataSource}
  4. * but will use their own {@link Connection}.
  5. * This constructor is useful when concurrency is desired.
  6. *
  7. * <p>The new {@code MetadataSource} initially contains all {@linkplain #addWarningListener warning listeners}
  8. * declared in the given {@code source}. But listeners added or removed in a {@code MetadataSource} after the
  9. * construction will not impact the other {@code MetadataSource} instance.</p>
  10. *
  11. * @param source the source from which to copy the configuration.
  12. */
  13. public MetadataSource(final MetadataSource source) {
  14. ArgumentChecks.ensureNonNull("source", source);
  15. standard = source.standard;
  16. dataSource = source.dataSource;
  17. catalog = source.catalog;
  18. schema = source.schema;
  19. quoteSchema = source.quoteSchema;
  20. statements = new CachedStatement[source.statements.length];
  21. tableColumns = new HashMap<>();
  22. classloader = source.classloader;
  23. pool = source.pool;
  24. lastUsed = source.lastUsed;
  25. listeners = new WarningListeners<>(this, source.listeners);
  26. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates a new instance for the given storage (typically file or database).
  3. * The {@code provider} argument is an optional information.
  4. * The {@code connector} argument is mandatory.
  5. *
  6. * @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
  7. * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
  8. * @throws DataStoreException if an error occurred while creating the data store for the given storage.
  9. *
  10. * @since 0.8
  11. */
  12. protected DataStore(final DataStoreProvider provider, final StorageConnector connector) throws DataStoreException {
  13. ArgumentChecks.ensureNonNull("connector", connector);
  14. this.provider = provider;
  15. this.name = connector.getStorageName();
  16. this.locale = Locale.getDefault(Locale.Category.DISPLAY);
  17. this.listeners = new WarningListeners<>(this);
  18. /*
  19. * Above locale is NOT OptionKey.LOCALE because we are not talking about the same locale.
  20. * The one in this DataStore is for warning and exception messages, not for parsing data.
  21. */
  22. }

代码示例来源:origin: org.apache.sis.storage/sis-storage

  1. /**
  2. * Creates a new instance for the given storage (typically file or database).
  3. * The {@code provider} argument is an optional information.
  4. * The {@code connector} argument is mandatory.
  5. *
  6. * @param provider the factory that created this {@code DataStore} instance, or {@code null} if unspecified.
  7. * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
  8. * @throws DataStoreException if an error occurred while creating the data store for the given storage.
  9. *
  10. * @since 0.8
  11. */
  12. protected DataStore(final DataStoreProvider provider, final StorageConnector connector) throws DataStoreException {
  13. ArgumentChecks.ensureNonNull("connector", connector);
  14. this.provider = provider;
  15. this.name = connector.getStorageName();
  16. this.locale = Locale.getDefault(Locale.Category.DISPLAY);
  17. this.listeners = new WarningListeners<>(this);
  18. /*
  19. * Above locale is NOT OptionKey.LOCALE because we are not talking about the same locale.
  20. * The one in this DataStore is for warning and exception messages, not for parsing data.
  21. */
  22. }

代码示例来源:origin: apache/sis

  1. /**
  2. * Creates a new instance as a child of another data store instance.
  3. * The new instance inherits the parent {@linkplain #getProvider() provider}.
  4. * The parent and the child share the same listeners: adding or removing a listener to a parent
  5. * adds or removes the same listeners to all children, and conversely.
  6. *
  7. * @param parent the parent data store, or {@code null} if none.
  8. * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
  9. * @throws DataStoreException if an error occurred while creating the data store for the given storage.
  10. *
  11. * @since 0.8
  12. */
  13. protected DataStore(final DataStore parent, final StorageConnector connector) throws DataStoreException {
  14. ArgumentChecks.ensureNonNull("connector", connector);
  15. if (parent != null) {
  16. provider = parent.provider;
  17. locale = parent.locale;
  18. listeners = parent.listeners;
  19. } else {
  20. provider = null;
  21. locale = Locale.getDefault(Locale.Category.DISPLAY);
  22. listeners = new WarningListeners<>(this);
  23. }
  24. name = connector.getStorageName();
  25. }

代码示例来源:origin: org.apache.sis.storage/sis-storage

  1. /**
  2. * Creates a new instance as a child of another data store instance.
  3. * The new instance inherits the parent {@linkplain #getProvider() provider}.
  4. * The parent and the child share the same listeners: adding or removing a listener to a parent
  5. * adds or removes the same listeners to all children, and conversely.
  6. *
  7. * @param parent the parent data store, or {@code null} if none.
  8. * @param connector information about the storage (URL, stream, reader instance, <i>etc</i>).
  9. * @throws DataStoreException if an error occurred while creating the data store for the given storage.
  10. *
  11. * @since 0.8
  12. */
  13. protected DataStore(final DataStore parent, final StorageConnector connector) throws DataStoreException {
  14. ArgumentChecks.ensureNonNull("connector", connector);
  15. if (parent != null) {
  16. provider = parent.provider;
  17. locale = parent.locale;
  18. listeners = parent.listeners;
  19. } else {
  20. provider = null;
  21. locale = Locale.getDefault(Locale.Category.DISPLAY);
  22. listeners = new WarningListeners<>(this);
  23. }
  24. name = connector.getStorageName();
  25. }

代码示例来源:origin: org.apache.sis.core/sis-metadata

  1. this.tableColumns = new HashMap<>();
  2. this.pool = new WeakValueHashMap<>(CacheKey.class);
  3. this.listeners = new WarningListeners<>(this);
  4. this.lastUsed = new ThreadLocal<LookupInfo>() {
  5. @Override protected LookupInfo initialValue() {

代码示例来源:origin: apache/sis

  1. this.tableColumns = new HashMap<>();
  2. this.pool = new WeakValueHashMap<>(CacheKey.class);
  3. this.listeners = new WarningListeners<>(this);
  4. this.lastUsed = ThreadLocal.withInitial(LookupInfo::new);

相关文章