org.eclipse.emf.emfstore.internal.client.model.util
Class PeriodicProjectSpaceTask

java.lang.Object
  extended by java.util.TimerTask
      extended by org.eclipse.emf.emfstore.internal.client.model.util.PeriodicProjectSpaceTask
All Implemented Interfaces:
Runnable

public abstract class PeriodicProjectSpaceTask
extends TimerTask

Class that enables to decorate a ProjectSpace with a task that gets executed periodically.

Author:
emueller

Constructor Summary
PeriodicProjectSpaceTask(ProjectSpace projectSpace, long interval)
          Constructor.
 
Method Summary
 long getInterval()
          Returns the interval in which the task is executed.
 ProjectSpace getProjectSpace()
          Returns the decorated ProjectSpace.
 void start()
          Starts the task.
 void stop()
          Stops the task.
 
Methods inherited from class java.util.TimerTask
cancel, run, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeriodicProjectSpaceTask

public PeriodicProjectSpaceTask(ProjectSpace projectSpace,
                                long interval)
Constructor.

Parameters:
projectSpace - the ProjectSpace that should get decorated
interval - the periodic interval in which the task gets executed
Method Detail

start

public void start()
Starts the task.


stop

public void stop()
Stops the task. If once stopped, continuation is not possible


getProjectSpace

public ProjectSpace getProjectSpace()
Returns the decorated ProjectSpace.

Returns:
the project space

getInterval

public long getInterval()
Returns the interval in which the task is executed.

Returns:
the interval


Copyright © 2015. All Rights Reserved.