Lockable variable class