OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


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

java.lang.Object
  extended byoracle.dmt.op.re.reapi.rt.DataCollectionCache


public final class DataCollectionCache
extends java.lang.Object

This class stores the collected user profile data in the memory and archives the data in RE schema periodically or when the cache is full.


Constructor Summary
DataCollectionCache(REProxyRT proxy)
Creates a new DataCollectionCache object.

Method Summary
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()
Closes the cache after cached data are properly archived
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 java.lang.OutOfMemoryError,
                           BadDBConnectionException,
                           java.sql.SQLException
Creates a new DataCollectionCache object.
Parameters:
proxy - the proxy it belongs to

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.
Throws:
BufferIsFullException

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.
Throws:
BufferIsFullException

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()
Closes the cache after cached data are properly archived

OracleAS Personalization Java API Reference
10g Release 2 (10.1.2)

B14053-01


Copyright © 2005 Oracle. All Rights Reserved.