com.bankframe.ei.txnhandler.hostcache
Class DataBaseCache

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.hostcache.DataBaseCache
All Implemented Interfaces:
Cache, Profile

Deprecated. Use the com.bankframe.serives.cache package instead

public class DataBaseCache
extends java.lang.Object
implements Cache

A database only caching implementation of the Cache interface.


Field Summary
static java.lang.String PERSISTENCE_CACHE_TABLE_NAME
          Deprecated. The name of the persistence table.
 
Method Summary
 boolean checkPrimaryKeyInCache(DataPacket primaryKeyOfEntity, long timeOutValue)
          Deprecated. This method checks for the primary key in the cache table.
 void close()
          Deprecated. This method closes the database connection.
 int flushPersistenceCacheTable()
          Deprecated. This method flushes the persistence table of all its entries.
 int maxDbCacheSize()
          Deprecated. This method returns the max allowed size of the database cache.
 int maxMemCacheSize()
          Deprecated. This method returns the max allowed size of the memory cache.
 int numberEntriesInDbCache()
          Deprecated. This method returns the number of items currently in the database cache.
 int numberEntriesInMemCache()
          Deprecated. This method returns the number of items currently in the memory cache.
 void open()
          Deprecated. This method opens the database connection.
 java.util.Vector remove(java.util.Vector pkOfEntitiesToRemove)
          Deprecated. Removes elements from the cache.
 java.util.Vector remove(java.util.Vector pkOfEntitiesToRemove, boolean persistenceTableToo)
          Deprecated. Removes elements from the cache.
 DataPacket retrieve(DataPacket primaryKeyOfEntity)
          Deprecated. This method retrieves the value associated with the pk passed in.
 void store(java.util.Map pkOfEntitiesToDataPacketResponses)
          Deprecated. This method stores the key and value in the db.
 void store(java.util.Map pkOfEntitiesToDataPacketResponses, boolean persistent)
          Deprecated. This method stores the key and value in the db.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERSISTENCE_CACHE_TABLE_NAME

public static final java.lang.String PERSISTENCE_CACHE_TABLE_NAME
Deprecated. 
The name of the persistence table.

See Also:
Constant Field Values
Method Detail

checkPrimaryKeyInCache

public boolean checkPrimaryKeyInCache(DataPacket primaryKeyOfEntity,
                                      long timeOutValue)
                               throws ProcessingErrorException
Deprecated. 
This method checks for the primary key in the cache table.

Specified by:
checkPrimaryKeyInCache in interface Cache
Parameters:
primaryKeyOfEntity - The pk to search on.
timeOutValue - The timeout value.
Returns:
Returns true if the pk is in the cache.
Throws:
ProcessingErrorException - If an exception occurred in accessing the database.

close

public void close()
           throws ProcessingErrorException
Deprecated. 
This method closes the database connection.

Specified by:
close in interface Cache
Throws:
ProcessingErrorException - If an error occurred in closing the db connection.

flushPersistenceCacheTable

public int flushPersistenceCacheTable()
                               throws ProcessingErrorException
Deprecated. 
This method flushes the persistence table of all its entries.

Returns:
Returns the number of rows deleted.
Throws:
ProcessingErrorException - If an error occurred during processing.

maxDbCacheSize

public int maxDbCacheSize()
Deprecated. 
This method returns the max allowed size of the database cache.

Specified by:
maxDbCacheSize in interface Profile
Returns:
int max size of cache.

maxMemCacheSize

public int maxMemCacheSize()
Deprecated. 
This method returns the max allowed size of the memory cache.

Specified by:
maxMemCacheSize in interface Profile
Returns:
int max size of cache.

numberEntriesInDbCache

public int numberEntriesInDbCache()
                           throws ProcessingErrorException
Deprecated. 
This method returns the number of items currently in the database cache.

Specified by:
numberEntriesInDbCache in interface Profile
Returns:
int The number of elements currently in the cache.
Throws:
ProcessingErrorException - If there was an exception thrown in the execution of the method.

numberEntriesInMemCache

public int numberEntriesInMemCache()
                            throws ProcessingErrorException
Deprecated. 
This method returns the number of items currently in the memory cache.

Specified by:
numberEntriesInMemCache in interface Profile
Returns:
int The number of elements currently in the cache.
Throws:
ProcessingErrorException - If there was an exception thrown in the execution of the method.

open

public void open()
          throws ProcessingErrorException
Deprecated. 
This method opens the database connection.

Specified by:
open in interface Cache
Throws:
ProcessingErrorException - If there was an error opening the db connection.

remove

public java.util.Vector remove(java.util.Vector pkOfEntitiesToRemove)
                        throws ProcessingErrorException
Deprecated. 
Removes elements from the cache.

Specified by:
remove in interface Cache
Parameters:
pkOfEntitiesToRemove - A vector of pks to remove.
Returns:
Returns the pks actually removed.
Throws:
ProcessingErrorException - If an error occurred while communicating with the db.

remove

public java.util.Vector remove(java.util.Vector pkOfEntitiesToRemove,
                               boolean persistenceTableToo)
                        throws ProcessingErrorException
Deprecated. 
Removes elements from the cache.

Specified by:
remove in interface Cache
Parameters:
pkOfEntitiesToRemove - A vector of pks to remove.
persistenceTableToo - This argument is ignored in this class.
Returns:
Returns the pks actually removed.
Throws:
ProcessingErrorException - If an error occurred while communicating with the db.

retrieve

public DataPacket retrieve(DataPacket primaryKeyOfEntity)
                    throws ProcessingErrorException
Deprecated. 
This method retrieves the value associated with the pk passed in.

Specified by:
retrieve in interface Cache
Parameters:
primaryKeyOfEntity - The pk to search on.
Returns:
The value corresponding to the pk passed in.
Throws:
ProcessingErrorException - If an exception occurred in accessing the database.

store

public void store(java.util.Map pkOfEntitiesToDataPacketResponses)
           throws ProcessingErrorException
Deprecated. 
This method stores the key and value in the db.

Specified by:
store in interface Cache
Parameters:
pkOfEntitiesToDataPacketResponses - A Map of pks and values to be stored.
Throws:
ProcessingErrorException - If an error occurred while communicating with the db.

store

public void store(java.util.Map pkOfEntitiesToDataPacketResponses,
                  boolean persistent)
           throws ProcessingErrorException
Deprecated. 
This method stores the key and value in the db.

Specified by:
store in interface Cache
Parameters:
pkOfEntitiesToDataPacketResponses - A Map of pks and values to be stored.
persistent - This parameter is ignored in this class.
Throws:
ProcessingErrorException - If an error occurred while communicating with the db.


Copyright © 2005, 2007, Oracle. All rights reserved.