com.bigdata.journal
Interface ITimestampService

All Superinterfaces:
IService, Remote
All Known Subinterfaces:
ITransactionService
All Known Implementing Classes:
AbstractEmbeddedTransactionService, AbstractTransactionService, DistributedTransactionService, EmbeddedFederation.EmbeddedTransactionServiceImpl, JournalTransactionService, TransactionServer.AdministrableTransactionService

public interface ITimestampService
extends IService

A service for unique timestamps.

Version:
$Id: ITimestampService.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 long nextTimestamp()
          Return the next unique timestamp.
 
Methods inherited from interface com.bigdata.service.IService
destroy, getHostname, getServiceIface, getServiceName, getServiceUUID
 

Method Detail

nextTimestamp

long nextTimestamp()
                   throws IOException
Return the next unique timestamp. Timestamps must be strictly increasing.

Note: This method MUST return strictly increasing values, even when it is invoked by concurrent threads. While other implementations are possible and may be more efficient, one way to insure thread safety is to synchronize on some object such that the implementaiton exhibits a FIFO behavior.

Throws:
IOException - if there is an RMI problem.
See Also:
TimestampServiceUtil.nextTimestamp(ITimestampService)


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.