net.sourceforge.domian.repository
Class PersistenceService

java.lang.Object
  extended by net.sourceforge.domian.repository.PersistenceService

public class PersistenceService
extends java.lang.Object

Service for persisting PersistentRepository instances.

Since:
0.4
Author:
Eirik Torske

Constructor Summary
PersistenceService(PersistentRepository repository)
          The interval between each persisting job is set to 10 minutes.
PersistenceService(PersistentRepository repository, java.util.Date persistingDate, java.lang.Integer persistingIntervalInSeconds)
           
PersistenceService(PersistentRepository repository, java.lang.Integer persistingIntervalInSeconds)
           
 
Method Summary
 java.util.concurrent.ScheduledFuture getRunnableScheduledFuture()
           
 java.util.concurrent.ScheduledExecutorService getScheduler()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceService

public PersistenceService(PersistentRepository repository)
The interval between each persisting job is set to 10 minutes.

Parameters:
repository - the repository to persist

PersistenceService

public PersistenceService(PersistentRepository repository,
                          java.lang.Integer persistingIntervalInSeconds)
Parameters:
repository - the repository to persist
persistingIntervalInSeconds - the number of seconds between each persisting job, and also initial delay before first run

PersistenceService

public PersistenceService(PersistentRepository repository,
                          java.util.Date persistingDate,
                          java.lang.Integer persistingIntervalInSeconds)
Parameters:
repository - the repository to persist
persistingDate - the absolute date for the first initial persisting job to run
persistingIntervalInSeconds - the number of seconds between each persisting job
Method Detail

getScheduler

public java.util.concurrent.ScheduledExecutorService getScheduler()

getRunnableScheduledFuture

public java.util.concurrent.ScheduledFuture getRunnableScheduledFuture()


Copyright © 2006-2010. All Rights Reserved.