コード例 #1
0
  synchronized void closeResultCache() {

    if (resultCache != null) {
      try {
        resultCache.close(false);
      } catch (HsqlException e) {
      }

      resultCache = null;
    }
  }
コード例 #2
0
  public DataFileCacheSession getResultCache() {

    if (resultCache == null) {
      String path = database.getTempDirectoryPath();

      if (path == null) {
        return null;
      }

      try {
        resultCache =
            new DataFileCacheSession(database, path + "/session_" + Long.toString(session.getId()));

        resultCache.open(false);
      } catch (Throwable t) {
        return null;
      }
    }

    return resultCache;
  }