org.geoserver.config.GeoServer.reset()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(261)

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

GeoServer.reset介绍

[英]Clears up all of the caches inside GeoServer forcing reloading of all information besides the configuration itself
[中]清除GeoServer内的所有缓存,强制重新加载配置本身以外的所有信息

代码示例

代码示例来源:origin: geoserver/geoserver

@Before
public void cleanupCatalog() {
  // attempt to solve intermittend build failure
  getGeoServer().reset();
}

代码示例来源:origin: org.geoserver/gs-restconfig

@RequestMapping(
    value = "/reset",
    method = {RequestMethod.POST, RequestMethod.PUT}
  )
  public void reset() {
    geoServer.reset();
  }
}

代码示例来源:origin: org.geoserver/restconfig

/**
   * Method to reload the catalog
   */
  protected void reloadCatalog() throws Exception {
    if(forceReset) {
      geoServer.reset();
    } else {
      geoServer.reload();
    }
  }
}

代码示例来源:origin: org.geoserver.web/web-core

@Override
  public void onClick(AjaxRequestTarget target) {
    try {
      getGeoServer().reset();
      info(getLocalizer().getString("resourceCacheClearedSuccessfully", this));
    } catch(Throwable t) {
      LOGGER.log(Level.SEVERE, "Error resetting resource caches", t);
      error(t);
    }
    target.addComponent(feedbackPanel);
  }
});

代码示例来源:origin: org.geoserver.web/gs-web-core

@Override
  public void onClick(AjaxRequestTarget target) {
    try {
      parent.getGeoServer().reset();
      info(
          getLocalizer()
              .getString("resourceCacheClearedSuccessfully", this));
    } catch (Throwable t) {
      LOGGER.log(Level.SEVERE, "Error resetting resource caches", t);
      error(t);
    }
    parent.addFeedbackPanels(target);
  }
});

代码示例来源:origin: org.geoserver/gs-wms

@Test
  public void testOTFFontRegistration() throws IOException {
    // loading fonts causes Java to open a Channel on the file, but there is no way to
    // release it from client code, thus the test will fail to delete filse on Windows
    Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS);

    // in case this font is already on the machine we cannot run a meaningful test
    FontCache fontCache = FontCache.getDefaultInstance();
    String fontName = "League Mono Regular";
    Assume.assumeThat(fontCache.getFont(fontName), CoreMatchers.nullValue());

    // copy over the font
    Resource styles = getDataDirectory().get("styles");
    String fontFileName = "LeagueMono-Regular.otf";
    try (InputStream is = WMSLifecycleHandlerTest.class.getResourceAsStream(fontFileName)) {
      assertNotNull(is);
      Resources.copy(is, styles, fontFileName);
    }

    // force a reset
    getGeoServer().reset();

    // now the font should be in font cache
    Font theFont = fontCache.getFont(fontName);
    assertThat(fontCache.getAvailableFonts().toString(), theFont, CoreMatchers.notNullValue());
  }
}

代码示例来源:origin: org.geoserver/gs-restconfig

getGeoServer().reset();

代码示例来源:origin: org.geoserver/gs-wfs

gml.setOverrideGMLAttributes(false);
getGeoServer().save(wfs);
getGeoServer().reset();

代码示例来源:origin: org.geoserver/gs-restconfig

getGeoServer().reset();

相关文章