Package org.eclipse.orion.server.core.resources

Examples of org.eclipse.orion.server.core.resources.FileLocker.release()


    } catch (IOException e) {
      // We shouldn't get here
      handleIndexingFailure(e, null);
    } finally {
      if (lock.isValid()) {
        lock.release();
      }
    }
    long duration = System.currentTimeMillis() - start;
    if (logger.isInfoEnabled()) {
      String activity = " (" + activeUserCount + '/' + userCount + " users active)"; //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here


      //ignore and fall through
    } catch (Exception e) {
      handleIndexingFailure(e);
    } finally {
      if (lock.isValid()) {
        lock.release();
      }
    }
    long duration = System.currentTimeMillis() - start;
    if (logger.isDebugEnabled())
      logger.debug("Purge job took " + duration + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

        outputStreamWriter.write("\n");
        outputStreamWriter.flush();
        outputStreamWriter.close();
        fileOutputStream.close();
      } finally {
        locker.release();
      }
    } catch (FileNotFoundException e) {
      Logger logger = LoggerFactory.getLogger("org.eclipse.orion.server.config"); //$NON-NLS-1$
      logger.error("Meta File Error, cannot create file under " + parent.toString() + ": invalid file name: " + name); //$NON-NLS-1$
      return false;
View Full Code Here

        throw new RuntimeException("Meta File Error, cannot delete file.");
      }
    } catch (IOException e) {
      throw new RuntimeException("Meta File Error, cannot delete file.", e);
    } finally {
      locker.release();
    }
    return true;
  }

  /**
 
View Full Code Here

        InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, utf8);
        inputStreamReader.read(chars);
        inputStreamReader.close();
        fileInputStream.close();
      } finally {
        locker.release();
      }
      jsonObject = new JSONObject(new String(chars));
    } catch (FileNotFoundException e) {
      throw new RuntimeException("Meta File Error, file not found", e);
    } catch (IOException e) {
View Full Code Here

        outputStreamWriter.write("\n");
        outputStreamWriter.flush();
        outputStreamWriter.close();
        fileOutputStream.close();
      } finally {
        locker.release();
      }
    } catch (FileNotFoundException e) {
      throw new RuntimeException("Meta File Error, file not found", e);
    } catch (IOException e) {
      Logger logger = LoggerFactory.getLogger("org.eclipse.orion.server.config"); //$NON-NLS-1$
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.