Package io.fabric8.api

Examples of io.fabric8.api.LockHandle.unlock()


                    return versions.contains(versionId);
                }
            };
            return executeInternal(context, null, gitop);
        } finally {
            readLock.unlock();
        }
    }

    @Override
    public Version getVersion(String versionId) {
View Full Code Here


                    return null;
                }
            };
            executeInternal(context, null, gitop);
        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public String createProfile(Profile profile) {
View Full Code Here

                    return createOrUpdateProfile(context, null, profile, new HashSet<String>());
                }
            };
            return executeInternal(context, null, gitop);
        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public String updateProfile(Profile profile) {
View Full Code Here

            } else {
                LOGGER.debug("Skip unchanged profile update for: {}", profile);
                return lastProfile.getId();
            }
        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public boolean hasProfile(final String versionId, final String profileId) {
View Full Code Here

                    return null;
                }
            };
            executeInternal(context, null, gitop);
        } finally {
            writeLock.unlock();
        }
    }

    private String createOrUpdateProfile(GitContext context, Profile lastProfile, Profile profile, Set<String> profiles) throws IOException, GitAPIException {
        assertWriteLock();
View Full Code Here

                    return doImportProfiles(git, context, profileZipUrls);
                }
            };
            executeWrite(gitop);
        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public void importFromFileSystem(String importPath) {
View Full Code Here

            assertValid();
            LOGGER.debug("External call to push");
            PushPolicyResult pushResult = doPushInternal(context, getCredentialsProvider());
            return pushResult.getPushResults();
        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public <T> T gitOperation(GitContext context, GitOperation<T> gitop, PersonIdent personIdent) {
View Full Code Here

        try {
            assertValid();
            LOGGER.debug("External call to execute a git operation: " + gitop);
            return executeInternal(context, personIdent, gitop);
        } finally {
            writeLock.unlock();
        }
    }

    private <T> T executeRead(GitOperation<T> operation) {
        return executeInternal(newGitReadContext(), null, operation);
View Full Code Here

           doPullInternal(new GitContext(), getCredentialsProvider(), true);
        } catch (Throwable e) {
            LOGGER.debug("Error during pull due " + e.getMessage(), e);
            LOGGER.warn("Error during pull due " + e.getMessage() + ". This exception is ignored.");
        } finally {
            writeLock.unlock();
        }
    }
   
    private PullPolicyResult doPullInternal(GitContext context, CredentialsProvider credentialsProvider, boolean allowVersionDelete) {
        PullPolicyResult pullResult = pullPushPolicy.doPull(context, getCredentialsProvider(), allowVersionDelete);
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.