Changing the storage characteristics

About this task

The IfxLoAlter() methods in the IfxSmartBlob class let you change the storage characteristics of a smart large object.

To change smart-large-object characteristics:

Procedure

  1. Create a new large-object descriptor.
    For example:
    IfxLobDescriptor loDesc = new IfxLobDescriptor(conn);
  2. Call IfxLobDescriptor.setCreateFlags(), setEstBytes(), IfxLobDescriptor.setMaxBytes(), setExtSize, and setSbspace() to specify the new characteristics:
    public void setCreateFlags( int flags )
    public void setEstBytes(long estSize)
    public void setMaxBytes (long maxSize)
    public void setExtSize (long extSize)
    public void setSbspace(java.lang.String sbspacename)

    The flag parameter is a constant from Set create flags.

  3. Call IfxLoAlter() to alter the existing smart large object to contain the new descriptor:
    public int IfxLoAlter(IfxLocator loPtr, IfxLobDescriptor loDesc) 
       throws SQLException
    public int IfxLoAlter(IfxBblob blob, IfxLobDescriptor loDesc) 
       throws SQLException
    public int IfxLoAlter(IfxCblob clob, IfxLobDescriptor loDesc) 
       throws SQLException

Results

IfxLoAlter() obtains an exclusive lock in the server for the entire smart large object before it proceeds with the update. It holds this lock until the update completes.