com.ibm.ims.application
Class SaveArea

java.lang.Object
  |
  +--com.ibm.ims.application.SaveArea
All Implemented Interfaces:
java.io.Serializable

public class SaveArea
extends java.lang.Object
implements java.io.Serializable

The SaveArea object is used during CHKP/XRST calls to checkpoint the application data objects.

See Also:
Serialized Form

Constructor Summary
SaveArea()
          The constructor of the SaveArea object.
 
Method Summary
 void addObject(java.lang.Object obj)
          Stores objects in the SaveArea object.
static int getCheckpointSizeLimit()
          Gets the maximum size of data the application can checkpoint
 java.lang.String[] getInvalidPCBs()
          The PCBs that were not reset correctly after the Symbolic restart call
 java.lang.Object getObject(int index)
          Retrieves objects stored inside SaveArea.
 boolean isEmpty()
          Checks if the there are no objects saved inside the SaveArea object.
 java.util.Iterator retrieveObjects()
          Collects all the objects stored inside the SaveArea object and returns it in an Iterator object.
static void setCheckpointSizeLimit(int sizeLimit)
          Sets the limit of the data that the application can checkpoint
 void setInvalidPCBs(java.lang.String pcbName)
          Stores the PCB name that was not reset after a Symbolic XRST call
 int size()
          Returns the number of objects being saved.
 boolean verifyPCBPosition(java.lang.String pcbName)
          Stores the PCB name that was not reset after a Symbolic XRST call
 boolean verifyPCBPosition(java.lang.String[] pcbArray)
          Verifies correct repositioning of databases after a XRST restart call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveArea

public SaveArea()
The constructor of the SaveArea object.
Method Detail

addObject

public void addObject(java.lang.Object obj)
Stores objects in the SaveArea object.
Parameters:
obj - The object to be saved

retrieveObjects

public java.util.Iterator retrieveObjects()
Collects all the objects stored inside the SaveArea object and returns it in an Iterator object.
Returns:
An Iterator containing the objects saved.

size

public int size()
Returns the number of objects being saved.
Returns:
The count (int) of objects saved inside the SaveArea object.

getObject

public java.lang.Object getObject(int index)
Retrieves objects stored inside SaveArea. The objects will be retrieved in the same order as they were stored in.
Parameters:
index - the index of Vector where the object
Returns:
Object

isEmpty

public boolean isEmpty()
Checks if the there are no objects saved inside the SaveArea object.
Returns:
boolean true if no objects stored in SaveArea and false otherwise

verifyPCBPosition

public boolean verifyPCBPosition(java.lang.String[] pcbArray)
                          throws IMSException

Verifies correct repositioning of databases after a XRST restart call.

An application that has just performed a restart using an restart call can use this call to confirm correct repositioning of its databases. Following such a restart, IMS attempts to reposition the databases to the positions existing at the time of the chosen checkpoint, using information saved in the checkpoint on the IMS log. In most cases, this should be successful, but for a list of exception conditions, see the description of the XRST call in IMS Application Programming: Database Manager.

This call accepts a String parameter naming a PCB in the application's PSB. It returns a boolean; true if this PCB was correctly repositioned or false if (possibly) not correctly positioned. If false, the application must take whatever action is required to ensure valid results before resuming processing. This action is likely to be application dependent.

Parameters:
pcbArray - String array of PCB reference or alias names as defined in the DatabaseView or Metadata class
Returns:
boolean true if this PCB was correctly repositioned or false if (possibly) not correctly positioned
Throws:
IMSException -  

getInvalidPCBs

public java.lang.String[] getInvalidPCBs()
The PCBs that were not reset correctly after the Symbolic restart call
Returns:
The array of PCB names

setInvalidPCBs

public void setInvalidPCBs(java.lang.String pcbName)
Stores the PCB name that was not reset after a Symbolic XRST call
Parameters:
pcbName - The name of the PCB

verifyPCBPosition

public boolean verifyPCBPosition(java.lang.String pcbName)
                          throws IMSException
Stores the PCB name that was not reset after a Symbolic XRST call
Parameters:
pcbName - The name of the PCB

setCheckpointSizeLimit

public static void setCheckpointSizeLimit(int sizeLimit)
Sets the limit of the data that the application can checkpoint
Parameters:
sizeLimit - The maximum size of a checkpoint area in bytes

getCheckpointSizeLimit

public static int getCheckpointSizeLimit()
Gets the maximum size of data the application can checkpoint
Returns:
The maximum size in bytes


(C) International Business Machines Corporation 2004. All rights reserved.