1. A computer-readable storage medium comprising computer executable instructions for automation of consistent lock management, said instructions comprising: requesting read access to a shared resource; receiving a const accessor object corresponding to said shared resource, wherein an accessor object class corresponding to said const accessor object comprises at least one read access function, and wherein said const accessor object obtains a read access lock on said shared resource; and registering said accessor object with a resource access manager, wherein said resource access manager tracks and manages accessor objects, accessing said shared resource through said accessor object; wherein compiling program code which attempts write access of said element through said const accessor object results in a compiler error.