Examples of FileManager


Examples of com.opensymphony.xwork2.FileManager

        return container;
    }

    private void init_CheckConfigurationReloading(Container container) {
        FileManager fileManager = container.getInstance(FileManager.class);
        fileManager.setReloadingConfigs("true".equals(container.getInstance(String.class,
                StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD)));
    }
View Full Code Here

Examples of com.opensymphony.xwork2.FileManager

        LocalizedTextUtil.addDefaultResourceBundle("org/apache/struts2/struts-messages");

        container = dispatcherUtils.getContainer();
        //check for configuration reloading
        if ("true".equalsIgnoreCase(container.getInstance(String.class, StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD))) {
            FileManager fileManager = container.getInstance(FileManager.class);
            fileManager.setReloadingConfigs(true);
        }

        actionMapper = container.getInstance(ActionMapper.class);
    }
View Full Code Here

Examples of com.planet_ink.coffee_web.interfaces.FileManager

    String host=request.getHost();
    final int x=host.indexOf(':');
    if(x>0) host=host.substring(0, x); // we only care about the host, we KNOW the port.
    final Pair<String,String> newPath=config.getMount(host,request.getClientPort(),fullPathStr);
    File finalFile;
    final FileManager mgr=config.getFileManager();
    if(newPath == null)
      finalFile = mgr.createFileFromPath(fullPathStr.replace('/', mgr.getFileSeparator()));
    else
    {
      String newFullPath=fullPathStr.substring(newPath.first.length());
      if(newFullPath.startsWith("/")&&newPath.second.endsWith("/"))
        newFullPath=newFullPath.substring(1);
      finalFile=mgr.createFileFromPath((newPath.second+newFullPath).replace('/', mgr.getFileSeparator())); // subtract one for the /
    }
    // see if the path we have is complete, or if there's an implicit default page requested.
    if(request.getUrlPath().endsWith("/"))
    {
      final File dirFile = finalFile;
      finalFile=mgr.createFileFromPath(finalFile,config.getDefaultPage());
      if((!finalFile.exists())&&(dirFile.exists())&&(dirFile.isDirectory()))
      {
        String browseCode = config.getBrowseCode(host,request.getClientPort(),fullPathStr);
        if(browseCode != null) // it's allowed to be browsed
          finalFile = dirFile;
View Full Code Here

Examples of com.rackspacecloud.blueflood.CloudFilesBackfiller.download.FileManager

        final File downloadDir = new File(config.getStringProperty(BackFillerConfig.DOWNLOAD_DIR));
        downloadDir.mkdirs();

        // connect the download service to the file manager.
        FileManager fileManager = new CloudFilesManager(USER, KEY, PROVIDER, ZONE, CONTAINER, config.getIntegerProperty(BackFillerConfig.BATCH_SIZE));
        DownloadService downloadService = new DownloadService(downloadDir);
        downloadService.setFileManager(fileManager);

        // delete any temp files before starting.
        for (File tmp : downloadDir.listFiles(new FilenameFilter() {
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

        throws EnvironmentNotFoundException,
               EnvironmentLockedException {

        EnvironmentImpl env =
            CmdUtil.makeUtilityEnvironment(envHome, true);
        FileManager fileManager = env.getFileManager();
        fileManager.setIncludeDeletedFiles(true);
        int readBufferSize =
            env.getConfigManager().getInt
            (EnvironmentParams.LOG_ITERATOR_READ_SIZE);

        /* Configure the startLsn and endOfFileLsn if reading backwards. */
 
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

     */
    private void init(EnvironmentImpl envImpl, long lastFileInPrevBackup)
        throws DatabaseException {

        this.envImpl = envImpl;
        FileManager fileManager = envImpl.getFileManager();

        /*
         * If the environment is writable, we need a r/w environment handle
         * in order to flip the file.
         */
        envIsReadOnly = fileManager.checkEnvHomePermissions(true);
        if ((!envIsReadOnly) && envImpl.isReadOnly()) {
            throw new IllegalArgumentException
                ("Environment handle may not be read-only when directory " +
                 "is read-write");
        }
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

        /*
         * Flip the log so that we can know that the list of files
         * corresponds to a given point.
         */
        if (envIsReadOnly) {
            FileManager fileManager = envImpl.getFileManager();
            lastFileInBackup = fileManager.getLastFileNum();
        } else {
            long newFileLsn = envImpl.forceLogFileFlip();
            lastFileInBackup = DbLsn.getFileNumber(newFileLsn) - 1;
        }
    }
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

     * constructor.
     */
    public synchronized
        String[] getLogFilesInBackupSet(long lastFileInPrevBackup) {
        checkBackupStarted();
        FileManager fileManager = envImpl.getFileManager();
        return fileManager.listFileNames(lastFileInPrevBackup + 1,
                                         lastFileInBackup);
    }
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

     * environment-wide failure occurs.
     */
    public void verify(final long startFile, final long endFile)
        throws LogVerificationException, IOException {

        final FileManager fileManager = envImpl.getFileManager();
        final File homeDir = envImpl.getEnvironmentHome();
        final String[] fileNames =
            fileManager.listFileNames(startFile, endFile - 1);
        final byte[] buf = new byte[readBufferSize];

        for (String fileName : fileNames) {
            final File file = new File(homeDir, fileName);
            final FileInputStream fis = new FileInputStream(file);
View Full Code Here

Examples of com.sleepycat.je.log.FileManager

    public RecoveryInfo recover(boolean readOnly)
        throws DatabaseException {

        startupTracker.start(Phase.TOTAL_RECOVERY);
        try {
            FileManager fileManager = envImpl.getFileManager();
            DbConfigManager configManager = envImpl.getConfigManager();
            boolean forceCheckpoint =
                configManager.getBoolean
                (EnvironmentParams.ENV_RECOVERY_FORCE_CHECKPOINT);
            if (fileManager.filesExist()) {

                /*
                 * Check whether log files are correctly located in the sub
                 * directories.
                 */
                fileManager.getAllFileNumbers();

                /*
                 * Establish the location of the end of the log.  Log this
                 * information to the java.util.logging logger, but delay
                 * tracing this information in the .jdb file, because the
                 * logging system is not yet initialized. Because of that, be
                 * sure to use lazy logging, and do not use
                 * LoggerUtils.logAndTrace().
                 */
                findEndOfLog(readOnly);

                String endOfLogMsg = "Recovery underway, found end of log";
                Trace.traceLazily(envImpl, endOfLogMsg);

                /*
                 * Establish the location of the root, the last checkpoint, and
                 * the first active LSN by finding the last checkpoint.
                 */
                findLastCheckpoint();

                envImpl.getLogManager().setLastLsnAtRecovery
                    (fileManager.getLastUsedLsn());

                /* Read in the root. */
                envImpl.readMapTreeFromLog(info.useRootLsn);

                /* Build the in memory tree from the log. */
 
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.