Package jetbrains.buildServer.vcs.impl
Class HistoryAwareRepositoryStateManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.vcs.impl.HistoryAwareRepositoryStateManagerImpl
-
- All Implemented Interfaces:
RepositoryStateManager
public class HistoryAwareRepositoryStateManagerImpl extends Object implements RepositoryStateManager
-
-
Field Summary
Fields Modifier and Type Field Description static intRESTORE_REVISION_CHANGES_DEPTH
-
Constructor Summary
Constructors Constructor Description HistoryAwareRepositoryStateManagerImpl(RepositoryStateStorage storage, TimeService time, EventDispatcher<RepositoryStateListener> repositoryStateEvents, MultiNodesEvents multiNodesEvents, VcsRootInstancesManager vcsRootInstancesManager, ServerResponsibility serverResponsibility, VcsModificationHistoryEx vcsHistory, ExecutorServices executorServices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryStategetRepositoryState(LVcsRootInstance repository)Returns persisted state or null if no state were persisted for given repositoryDategetRepositoryStateUpdateTime(LVcsRootInstance repository)Returns a timestamp when the repository state has been updated last time.voidrefreshRepositoryState(LVcsRootInstance repository)Refreshes the cached in-memory copy of the repository state from the database.voidsetRepositoryState(LVcsRootInstance repository, RepositoryState state)Persists repository state
-
-
-
Constructor Detail
-
HistoryAwareRepositoryStateManagerImpl
public HistoryAwareRepositoryStateManagerImpl(@NotNull RepositoryStateStorage storage, @NotNull TimeService time, @NotNull EventDispatcher<RepositoryStateListener> repositoryStateEvents, @NotNull MultiNodesEvents multiNodesEvents, @NotNull VcsRootInstancesManager vcsRootInstancesManager, @NotNull ServerResponsibility serverResponsibility, @NotNull VcsModificationHistoryEx vcsHistory, @NotNull ExecutorServices executorServices)
-
-
Method Detail
-
refreshRepositoryState
public void refreshRepositoryState(@NotNull LVcsRootInstance repository)Description copied from interface:RepositoryStateManagerRefreshes the cached in-memory copy of the repository state from the database.- Specified by:
refreshRepositoryStatein interfaceRepositoryStateManager
-
setRepositoryState
public void setRepositoryState(@NotNull LVcsRootInstance repository, @NotNull RepositoryState state)Description copied from interface:RepositoryStateManagerPersists repository state- Specified by:
setRepositoryStatein interfaceRepositoryStateManager- Parameters:
repository- repository of intereststate- state of repository
-
getRepositoryState
@NotNull public RepositoryState getRepositoryState(@NotNull LVcsRootInstance repository)
Description copied from interface:RepositoryStateManagerReturns persisted state or null if no state were persisted for given repository- Specified by:
getRepositoryStatein interfaceRepositoryStateManager- Parameters:
repository- repository of interest- Returns:
- see above
-
getRepositoryStateUpdateTime
@Nullable public Date getRepositoryStateUpdateTime(@NotNull LVcsRootInstance repository)
Description copied from interface:RepositoryStateManagerReturns a timestamp when the repository state has been updated last time. In this case the update time is not always the same asRepositoryState.getCreateTimestamp(). For instance, if the state is empty (VcsRepositoryState.isEmpty()returns true), then the update time will be null because the state has not been updated as a result of the checking for changes operation, but rather has just been created.- Specified by:
getRepositoryStateUpdateTimein interfaceRepositoryStateManager- Returns:
-
-