JSPservletPkg
Interface CacheIntf

All Known Implementing Classes:
Cache

abstract interface CacheIntf

Cache interface for Mapper.

Copyright (c) 2000-2001

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; version 2
 of the License.
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 

Version:
1, 0, 4
Author:
Alexis Grandemange

Method Summary
 void clear(int nbdays)
          Remove cache entries older than nbdays.
 void register(long address1, long address2, java.lang.String code)
          Register a new range and PageBox set in cache.
Validated with mapper.testMisc.
 void remove(long address)
          Remove a url mapping from cache.
Validated with mapper.testMisc.
 java.lang.String report()
          Returns a report string about cache content.
 java.lang.String retrieve(long address)
          Retrieve a country code from cache.
Validated with mapper.testMisc.
 boolean save()
          Periodically called.
Intented to be used to save the cache.
 

Method Detail

report

public java.lang.String report()
Returns a report string about cache content.

register

public void register(long address1,
                     long address2,
                     java.lang.String code)
Register a new range and PageBox set in cache.
Validated with mapper.testMisc.
Parameters:
address1 - first requestor address in the range.
address2 - last requestor address in the range.
code - country code.

retrieve

public java.lang.String retrieve(long address)
Retrieve a country code from cache.
Validated with mapper.testMisc.
Parameters:
address - requestor address.

remove

public void remove(long address)
Remove a url mapping from cache.
Validated with mapper.testMisc.
Parameters:
address - requestor address - any address in the range.

clear

public void clear(int nbdays)
Remove cache entries older than nbdays.
Parameters:
nbdays - maximum life in cache (days).

save

public boolean save()
Periodically called.
Intented to be used to save the cache.