org.tentackle.db
Class TableSerialExpirationBacklog

java.lang.Object
  extended by org.tentackle.db.TableSerialExpirationBacklog

public class TableSerialExpirationBacklog
extends Object

Keeps a backlog of expiration sets.
Used in RMI-servers to reduce database roundtrips for clients requesting the expiration info for their local caches.

Author:
harald

Constructor Summary
TableSerialExpirationBacklog()
          Creates a backlog with a default size.
TableSerialExpirationBacklog(int size)
          Creates a backlog.
 
Method Summary
 void addExpiration(long minSerial, long maxSerial, long[] idSer)
          Adds an expiration set to the backlog.
 long[] getExpiration(long minSerial, long maxSerial)
          Gets the expiration backlog for a given range of tableserials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSerialExpirationBacklog

public TableSerialExpirationBacklog(int size)
Creates a backlog.

Parameters:
size - the size of the backlog

TableSerialExpirationBacklog

public TableSerialExpirationBacklog()
Creates a backlog with a default size.

Method Detail

addExpiration

public void addExpiration(long minSerial,
                          long maxSerial,
                          long[] idSer)
Adds an expiration set to the backlog.

Parameters:
minSerial - the lower serial bound of the query (minSerial < tableSerial)
maxSerial - the upper serial bound of the query (tableSerial <= maxSerial)
idSer - the expiration info as pairs of id/tableserial.

getExpiration

public long[] getExpiration(long minSerial,
                            long maxSerial)
Gets the expiration backlog for a given range of tableserials.

Parameters:
minSerial - the lower serial bound of the query (minSerial < tableSerial)
maxSerial - the upper serial bound of the query (tableSerial <= maxSerial)
Returns:
the expiration info as pairs of id/tableserial, null if given range was not found in the backlog


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de