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 int
RESTORE_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 RepositoryState
getRepositoryState(LVcsRootInstance repository)
Returns persisted state or null if no state were persisted for given repositoryDate
getRepositoryStateUpdateTime(LVcsRootInstance repository)
Returns a timestamp when the repository state has been updated last time.void
refreshRepositoryState(LVcsRootInstance repository)
Refreshes the cached in-memory copy of the repository state from the database.void
setRepositoryState(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:RepositoryStateManager
Refreshes the cached in-memory copy of the repository state from the database.- Specified by:
refreshRepositoryState
in interfaceRepositoryStateManager
-
setRepositoryState
public void setRepositoryState(@NotNull LVcsRootInstance repository, @NotNull RepositoryState state)
Description copied from interface:RepositoryStateManager
Persists repository state- Specified by:
setRepositoryState
in interfaceRepositoryStateManager
- Parameters:
repository
- repository of intereststate
- state of repository
-
getRepositoryState
@NotNull public RepositoryState getRepositoryState(@NotNull LVcsRootInstance repository)
Description copied from interface:RepositoryStateManager
Returns persisted state or null if no state were persisted for given repository- Specified by:
getRepositoryState
in interfaceRepositoryStateManager
- Parameters:
repository
- repository of interest- Returns:
- see above
-
getRepositoryStateUpdateTime
@Nullable public Date getRepositoryStateUpdateTime(@NotNull LVcsRootInstance repository)
Description copied from interface:RepositoryStateManager
Returns 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:
getRepositoryStateUpdateTime
in interfaceRepositoryStateManager
- Returns:
-
-