Package org.rhq.core.domain.drift

Examples of org.rhq.core.domain.drift.JPADriftFile


    private JPADriftFile getDriftFile(String sha256, List<JPADriftFile> emptyDriftFiles, boolean addToList) {
        if (null == sha256 || "0".equals(sha256)) {
            return null;
        }

        JPADriftFile result = entityManager.find(JPADriftFile.class, sha256);
        // if the JPADriftFile is not yet in the db then persist it, and mark it requested if content is to be fetched
        // note - by immediately setting the initial status to REQUESTED we avoid a future update and a
        // potential deadlock scenario where the REQUESTED and LOADED status updates can happen simultaneously
        if (null == result) {
            JPADriftFile driftFile = new JPADriftFile(sha256);
            if (addToList) {
                driftFile.setStatus(DriftFileStatus.REQUESTED);
            }
            result = persistDriftFile(driftFile);
            if (addToList) {
                emptyDriftFiles.add(result);
            }
View Full Code Here


        File dir = FileUtil.createTempDirectory(zipFileName.substring(0, zipFileName.indexOf(".")),null,tmpDir);
        dir.mkdir();

        ZipUtil.unzipFile(filesZip, dir);
        for (File file : dir.listFiles()) {
            JPADriftFile driftFile = new JPADriftFile(file.getName());
            try {
                JPADriftServer.persistDriftFileData(driftFile, new FileInputStream(file), file.length());
            } catch (Exception e) {
                LogFactory.getLog(getClass()).info("Skipping bad drift file", e);
            }
View Full Code Here

    }

    List<DriftFile> driftFiles(String... hashes) {
        List<DriftFile> files = new ArrayList<DriftFile>();
        for (String hash : hashes) {
            files.add(new JPADriftFile(hash));
        }
        return files;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.drift.JPADriftFile

Copyright © 2018 www.massapicom. 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.