public class RepoSyncDaemonImpl extends Object implements RepoSyncDaemon
RepoSyncDaemon.Property, RepoSyncDaemon.PropertyEnum
CONFIG_KEY_SYNC_STATES_MAX_SIZE, DEFAULT_SYNC_STATES_MAX_SIZE
Modifier | Constructor and Description |
---|---|
protected |
RepoSyncDaemonImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(RepoSyncDaemon.Property property,
PropertyChangeListener listener) |
protected void |
firePropertyChange(RepoSyncDaemon.Property property,
Object oldValue,
Object newValue) |
Set<RepoSyncActivity> |
getActivities(UUID localRepositoryId)
Gets all
RepoSyncActivity -s for the local repository identified by the given localRepositoryId . |
static RepoSyncDaemon |
getInstance() |
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) |
protected RepoSyncDaemonImpl()
public static RepoSyncDaemon getInstance()
public UUID startSync(File file)
startSync
in interface RepoSyncDaemon
public List<RepoSyncState> getStates(UUID localRepositoryId)
RepoSyncDaemon
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 RepoSyncDaemon.getActivities(UUID)
.
getStates
in interface RepoSyncDaemon
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!).public Set<RepoSyncActivity> getActivities(UUID localRepositoryId)
RepoSyncDaemon
RepoSyncActivity
-s for the local repository identified by the given localRepositoryId
.getActivities
in interface RepoSyncDaemon
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!).public void shutdown()
shutdown
in interface RepoSyncDaemon
public void shutdownNow()
shutdownNow
in interface RepoSyncDaemon
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
addPropertyChangeListener
in interface RepoSyncDaemon
public void addPropertyChangeListener(RepoSyncDaemon.Property property, PropertyChangeListener listener)
addPropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
addPropertyChangeListener
in interface RepoSyncDaemon
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
removePropertyChangeListener
in interface RepoSyncDaemon
public void removePropertyChangeListener(RepoSyncDaemon.Property property, PropertyChangeListener listener)
removePropertyChangeListener
in interface Bean<RepoSyncDaemon.Property>
removePropertyChangeListener
in interface RepoSyncDaemon
protected void firePropertyChange(RepoSyncDaemon.Property property, Object oldValue, Object newValue)
Copyright © 2013–2019. All rights reserved.