Title: HeartBeat
Description: This object is used to simulate using pid to avoid multiple
instance running in native program. A heartbeat will periodically touch his
lockfile. A new heartbeat object with same lockfile will exame the existence of
the lockfile when it was constructed. If the lockfile was exist, it will exame
the lastmodified of the file with two beattime period. When the timestamp got
changed, it will throw exception. Otherwise it will take over the ownership of
the lockfile.
Copyright: Copyright (c) 2002
Company: Sun Microsystems
author: Allen Chiang version: 1.0 |