public interface RepoSyncDaemon extends Bean<RepoSyncDaemon.Property>
Modifier and Type | Interface and Description |
---|---|
static interface |
RepoSyncDaemon.Property |
static class |
RepoSyncDaemon.PropertyEnum |
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_KEY_SYNC_STATES_MAX_SIZE
The maximum number of
SyncState elements to keep for each unique combination of
localRepositoryId and remoteRepositoryId . |
static int |
DEFAULT_SYNC_STATES_MAX_SIZE |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(RepoSyncDaemon.Property property,
PropertyChangeListener listener) |
Set<RepoSyncActivity> |
getActivities(UUID localRepositoryId)
Gets all
RepoSyncActivity -s for the local repository identified by the given localRepositoryId . |
List<RepoSyncState> |
getStates(UUID localRepositoryId)
Gets the sync-states of the local repository identified by the given
localRepositoryId . |
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
removePropertyChangeListener(RepoSyncDaemon.Property property,
PropertyChangeListener listener) |
void |
shutdown() |
void |
shutdownNow() |
UUID |
startSync(File file) |
static final String CONFIG_KEY_SYNC_STATES_MAX_SIZE
SyncState
elements to keep for each unique combination of
localRepositoryId
and remoteRepositoryId
.
The default value is DEFAULT_SYNC_STATES_MAX_SIZE
.
Example: If this value is set to 2 and a certain local repository is connected to 3 remote repositories, there are 3 unique combinations of local/remote-repository-id and therefore 6 sync-states are kept. These sync-states are the 2 newest ones for each pair of local+remote repo.
static final int DEFAULT_SYNC_STATES_MAX_SIZE
void shutdown()
void shutdownNow()
List<RepoSyncState> getStates(UUID localRepositoryId)
localRepositoryId
.
The sync-states are sorted according to the time they are enlisted with the newest entries last (i.e. the oldest first).
Please note that these states describe only syncs that are complete (either successful or failed).
To determine whether a sync is currently queued or in progress, please use getActivities(UUID)
.
localRepositoryId
- the identifier of the local repository. Must not be null
.null
(but maybe empty). This result is read-only and
a detached copy of the internal state (not backed!).Set<RepoSyncActivity> getActivities(UUID localRepositoryId)
RepoSyncActivity
-s for the local repository identified by the given localRepositoryId
.localRepositoryId
- the identifier of the local repository. Must not be null
.null
(but maybe empty). This result is read-only and
a detached copy of the internal state (not backed!).void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
void addPropertyChangeListener(RepoSyncDaemon.Property property, PropertyChangeListener listener)
addPropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
void removePropertyChangeListener(RepoSyncDaemon.Property property, PropertyChangeListener listener)
removePropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
Copyright © 2013–2019. All rights reserved.