Byte-range locking
By default, the database server uses whole lock-all locks when it needs to lock a smart large object. Lock-all locks are an “all or nothing" lock; that is, they lock the entire smart large object. When the database server obtains an exclusive lock, no other user can access the data of the smart large object as long as the lock is held.
If this locking is too restrictive for the concurrency requirements of your application, you can use byte-range locking instead of lock-all locking. With byte-range locking, you can specify the range of bytes to lock in the smart-large-object data. If other users access other portions of the data, they can still acquire their own byte-range lock.
public long IfxLoLock(int lofd, long offset, int whence, long range, int lockmode) throws SQLException
public long IfxLoUnLock( int lofd, long offset, int whence, long range) throws SQLException
The lofd parameter is the locator file descriptor returned by the IfxLoCreate() or IfxLoOpen() method. The offset parameter is an offset from the starting seek position. The whence parameter identifies the starting seek position. The values are described in the table in Position within a smart large object.
The range parameter indicates the number of bytes to lock
or unlock within the smart large object. The lockmode parameter
indicates what type of lock to create. The values can be either IfxSmartBlob.LO_EXCLUSIVE_MODE
or IfxSmartBlob.LO_SHARED_MODE.