package rac; /** * The installable policy for a RAC (Restricted Access Container). This class * provides the store(), retrieve() and init() methods that the RAC uses. * @author S. Wong */ public abstract class ARACPolicy { /** * The RACont will dispatch its store(data) method through this method to * perform the data store operation. * @param data The data to be stored in the RACont. * @param stopNode The RACStopNode that is the head/tail of this internal * doubly-linked circular data list of the RACont. */ public abstract void store(Object data, RACStopNode stopNode); /** * The RACont will dispatch its retrieve() method through this method to * perform the data retrieval operation. * @param stopNode The RACStopNode that is the head/tail of this internal * doubly-linked circular data list of the RACont. * @return The data value found. */ public abstract Object retrieve(RACStopNode stopNode); /** * This method is called when a ARACPolicy is installed in the RACont. The * policy cannot assume that the data in the RACont is in any particular * order, nor that the data are all valid, acceptible types. It is the * responsibility of the policy's init() method to prepare the data for use * by the policy. By default, the init() method does nothing. * @param stopNode The RACStopNode that is the head/tail of this internal * doubly-linked circular data list of the RACont. */ public void init(RACStopNode stopNode) { } }