Oracle Personalization
REAPI_RT
v9.0.2

oracle.dmt.op.re.reapi.rt
Class DataCollectionCache

java.lang.Object
  |
  +--oracle.dmt.op.re.reapi.rt.DataCollectionCache

public final class DataCollectionCache
extends Object

Dynamic Data Store is shared by all data collection APIs. It stores the collected object in cache and archives the data periodically or when the cache is full.


Constructor Summary
DataCollectionCache(REProxyRT proxy)
           
 
Method Summary
TypeMethod
 void addItem(IdentificationData idd, DataItem item)
          Adds the specified item to the profile of the user or the session specified by idData.
 void addItems(IdentificationData idd, DataItem[] items)
          Adds one or more items to the profile of the user or the session specified by idData.
 void archive()
          Flushes cached item data in the main buffer to the database.
 void close()
           
static int kbyes2NItems(int kb)
          Converts Kbytes to array size.
 void removeItem(IdentificationData idData, DataItem item)
          Removes the item from the specified session or from the profile of the specified user.
 void removeItems(IdentificationData idData, DataItem[] items)
          Removes the items from the specified session or from the profile of the specified user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCollectionCache

public DataCollectionCache(REProxyRT proxy)
                    throws OutOfMemoryError,
                           BadDBConnectionException,
                           SQLException
Method Detail

kbyes2NItems

public static int kbyes2NItems(int kb)
Converts Kbytes to array size. Because of the dual buffer, each buffer is one half of Kb. The size of arrays is estimated as follows: Extra overhead has been added for arrays. It is hence made up to 208.

archive

public void archive()
Flushes cached item data in the main buffer to the database. It takes these steps:

addItem

public void addItem(IdentificationData idd,
                    DataItem item)
             throws BufferIsFullException
Adds the specified item to the profile of the user or the session specified by idData. Item specifies the data source type, item type, item ID, and value of the item.

addItems

public void addItems(IdentificationData idd,
                     DataItem[] items)
              throws BufferIsFullException
Adds one or more items to the profile of the user or the session specified by idData. Item[i] specifies the data source type, item type, item ID, and value of the ith item. The items are stored in an array.

removeItem

public void removeItem(IdentificationData idData,
                       DataItem item)
Removes the item from the specified session or from the profile of the specified user. Removes an item that has not been written to the MTR (permanent storage). Data is written to the MTR after the session is closed or times out.

This method cannot be used to remove an item from a user profile that has been written to permanent storage.

If a specified item is not in the user's profile, OP does nothing.


removeItems

public void removeItems(IdentificationData idData,
                        DataItem[] items)
Removes the items from the specified session or from the profile of the specified user. Removes items that have not been written to the MTR (permanent storage). Data is written to the MTR after the session is closed or times out.

Cannot be used to remove items from a user profile that have been written to permanent storage.

If a specified item is not in the user's profile, OP does nothing.


close

public void close()

Oracle Personalization
REAPI_RT
v9.0.2