com.esri.arcgis.system
Class AfLockMgr

java.lang.Object
  extended by com.esri.arcgis.system.AfLockMgr
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IAfLockMgr, Serializable

public class AfLockMgr
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IAfLockMgr

The application lock manager.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AfLockMgr()
          Constructs a AfLockMgr using ArcGIS Engine.
AfLockMgr(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AfLockMgr theAfLockMgr = (AfLockMgr) obj;
 
Method Summary
 boolean checkLock(String fileName, int lockMgrType)
          Indicates if the specified lock type can be sucessfully set on the filename.
 boolean clearLock(String fileName, int lockMgrType)
          Clears the specified lock type from the filename.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void isAlive()
          Indicates if a local lock manager process is active.
 boolean isGlobalAlive()
          Indicates if a global lock manager process is active.
 boolean register()
          Registers object with the lock manager and starts the lock manager process if it is not running.
 boolean setLock(String fileName, int lockMgrType)
          Places the selected lock type on the given filename.
 boolean unregister()
          Unregisters object from the lock manager and removes all locks set by the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

AfLockMgr

public AfLockMgr()
          throws IOException,
                 UnknownHostException
Constructs a AfLockMgr using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

AfLockMgr

public AfLockMgr(Object obj)
          throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AfLockMgr theAfLockMgr = (AfLockMgr) obj;

Construct a AfLockMgr using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AfLockMgr.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

isAlive

public void isAlive()
             throws IOException,
                    AutomationException
Indicates if a local lock manager process is active.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isAlive in interface IAfLockMgr
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isGlobalAlive

public boolean isGlobalAlive()
                      throws IOException,
                             AutomationException
Indicates if a global lock manager process is active.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isGlobalAlive in interface IAfLockMgr
Returns:
The pbGlobalAlive
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

register

public boolean register()
                 throws IOException,
                        AutomationException
Registers object with the lock manager and starts the lock manager process if it is not running.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
register in interface IAfLockMgr
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unregister

public boolean unregister()
                   throws IOException,
                          AutomationException
Unregisters object from the lock manager and removes all locks set by the object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
unregister in interface IAfLockMgr
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLock

public boolean setLock(String fileName,
                       int lockMgrType)
                throws IOException,
                       AutomationException
Places the selected lock type on the given filename.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setLock in interface IAfLockMgr
Parameters:
fileName - The fileName (in)
lockMgrType - A com.esri.arcgis.system.esriLockMgrType constant (in)
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkLock

public boolean checkLock(String fileName,
                         int lockMgrType)
                  throws IOException,
                         AutomationException
Indicates if the specified lock type can be sucessfully set on the filename.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
checkLock in interface IAfLockMgr
Parameters:
fileName - The fileName (in)
lockMgrType - A com.esri.arcgis.system.esriLockMgrType constant (in)
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearLock

public boolean clearLock(String fileName,
                         int lockMgrType)
                  throws IOException,
                         AutomationException
Clears the specified lock type from the filename.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearLock in interface IAfLockMgr
Parameters:
fileName - The fileName (in)
lockMgrType - A com.esri.arcgis.system.esriLockMgrType constant (in)
Returns:
The succeeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.