Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application
The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation
Example only some embodiments of the present application, rather than whole embodiments.It is common based on the embodiment in the application, this area
The every other embodiment that technical staff is obtained under the premise of creative work is not made, it should all belong to the application protection
Scope.
Fig. 1 is the access control method flow chart of one embodiment shared resource of the application.Fig. 1 method can be by sharing
Resources accessing control device performs.This method may include:
S102, the access request according to user to shared resource, obtain lock mark corresponding to the shared resource.
It should be understood that in the embodiment of the present application, lock mark corresponding to shared resource can be with unique mark shared object money
Source.
It should be understood that shared object resource, can be a kind of hardware resource or one kind in the embodiment of the present application
Software resource, such as memory space resource, operating resource etc..
S104, safeguard that resource lock corresponding to lock mark takes record in resource lock table.
Wherein, the resource lock table is used for the resource lock occupancy record for storing shared resource.
S104, according to the maintenance result, determine access rights of the user to the shared resource.
In the embodiment of the present application, by safeguarding resource lock of the shared resource in resource lock table according to the access request of user
Record is taken, then according to safeguarding that result determines the access rights of user, so as to realize resource in a manner of relatively simple
Lock, reduces the cost for realizing resource lock.
Alternatively, as one embodiment, the resource lock, which takes record, to be included the lock user of the shared resource and locked
Time phase, wherein, step S104 specifically can be achieved be:
Safeguard that resource lock corresponding to lock mark takes the lock user in record and lock expired time in resource lock table.
In a kind of specific implementation of the embodiment of the present application, step S104 specifically can be achieved be:
If resource lock corresponding to lock mark is not present in the resource lock table takes record, increase in the resource lock table
Add resource lock corresponding to lock mark to take record, lock user is recorded as the user, and record lock expired time;
Wherein, step S106 specifically can be achieved be:
If the maintenance result represents that increasing resource lock occupancy records successfully, determines that the user possesses to the shared resource
Access rights.
In the embodiment of the present application, when resource lock occupancy record corresponding to lock mark is not present in resource lock table, it is determined that should
User possesses access rights to the shared resource, and increases resource lock occupancy record corresponding to lock mark to hold to shared resource
Lock, so as to realize resource lock in a manner of relatively simple, reduce the cost for realizing resource lock.
In another specific implementation of the embodiment of the present application, step S104 specifically can be achieved be:
If resource lock corresponding to lock mark in the resource lock table being present takes record, and the resource lock takes record
Lock user is the user, then renewal lock expired time;
Wherein, step S106 specifically can be achieved be:
If the maintenance result represents that updating resource lock occupancy records successfully, determines that the user possesses to the shared resource
Access rights.
In the embodiment of the present application, when resource lock occupancy record corresponding to lock mark in resource lock table be present, the use is determined
Family possesses access rights to the shared resource, and resource lock corresponding to updating lock mark takes the lock expired time of record to keep
Hold the lock to shared resource, so as to realize resource lock in a manner of relatively simple, reduce the cost for realizing resource lock.
In another specific implementation of the embodiment of the present application, step S104 specifically can be achieved be:
If resource lock corresponding to lock mark in the resource lock table being present takes record, and current time is more than or equal to
Expired time is locked, then it is the user to update the resource lock to take the lock user recorded, and updates lock expired time;
Wherein, step S106 specifically can be achieved be:
If the maintenance result represent update the resource lock take record successfully, it is determined that the user to the shared resource not
Possess access rights.
In the embodiment of the present application, when in resource lock table exist lock mark corresponding to resource lock take record when, and it is current when
Between beyond lock expired time, determine that the user possesses access rights to the shared resource, and update lock mark corresponding to resource
Lock takes record lock user and lock expired time to hold the lock to shared resource, so as to real in a manner of relatively simple
Existing resource lock, reduces the cost for realizing resource lock.
In another specific implementation of the embodiment of the present application, step S104 specifically can be achieved be:
If resource lock corresponding to lock mark in the resource lock table being present takes record, and the resource lock takes record
Lock user is not the user, and current time is less than lock expired time, then does not update the resource lock and take record;
Wherein, step S106 specifically can be achieved be:
If the maintenance result represents that not taking record to the resource lock is updated, it is determined that the user is to the shared money
Source does not possess access rights.
In the embodiment of the present application, when resource lock occupancy record corresponding to lock mark in resource lock table be present, and the resource
The lock user that lock takes record is not the user, and current time is less than lock expired time, determines the user to the shared money
Source does not possess access rights, so as to realize resource lock in a manner of relatively simple, reduces the cost for realizing resource lock.
Alternatively, this method also includes:After the access to the shared object terminates, discharge and provided corresponding to the shared resource
Source lock takes the lock resource of record.
Further, the lock resource that the resource lock takes record is discharged, including:
Reacquire resource lock corresponding to the shared resource and take record;
If the lock user that the resource lock reacquired is taken in record is the user, resource lock occupancy is deleted
Record.
In the embodiment of the present application, after the access to the shared object terminates, reacquire and provided corresponding to the shared resource
Source lock takes record, and if deleting the money when the lock user during the resource lock reacquired takes record is the user
Source lock takes record to discharge lock resource, so as to realize resource lock in a manner of relatively simple, reduces and realizes resource lock
Cost.
Further, the lock resource that the resource lock takes record is discharged, including:
Reacquire resource lock corresponding to the shared resource and take record;
If the lock user that the resource lock reacquired is taken in record is not the user, deletion action is not performed
Directly return.
In the embodiment of the present application, after the access to the shared object terminates, reacquire and provided corresponding to the shared resource
Source lock takes record, and if directly returned when the lock user during the resource lock reacquired takes record is not the user
Return, so as to realize resource lock in a manner of relatively simple, reduce the cost for realizing resource lock.
Alternatively, the resource lock table is the resource lock table in database.
Alternatively, multiple access requests of the shared resource come from same distributed system;Or the shared resource
Multiple access requests come from different distributed systems.
Below, the scheme of the embodiment of the present application will be further described in conjunction with specific embodiments.
Fig. 2 is the lock control scheme schematic diagram of one embodiment shared resource of the application.In the schematic diagram shown in Fig. 2
In, with the resource lock table of database purchase shared resource.It should be understood, of course, that in the embodiment of the present application, it can also use other sides
Formula storage resource locks table, for example, listed files etc..Obviously, it is so that resource lock table can by the way of database purchase
It is easy to a kind of preferable mode of shared maintenance.Implementation shown in the application Fig. 1 will be introduced by taking Fig. 2 lock control scheme as an example below
Example.
As shown in Fig. 2 a resource lock table (RES_LOCK_TABLE) can be built in database (DB) to preserve resource lock
Take record.Server where application system can realize the resource lock of shared resource by accessing the resource lock table.Ying Li
Solution, the application system of resource lock table is accessed, a distributed system is may belong to, multiple different distributions can also be belonging respectively to
Formula system.
Preferably, in the scene shown in Fig. 2, the component interface for accessing resource lock table can be encapsulated, and is supplied to using system
System, with application system deployment on the same server.For example, in the scene shown in Fig. 2, the component interface can be
Lock_client.jar component bag.
In resource lock table, all shared resources can represent by rules abstraction is a key character string, one
Key uniquely represents a shared resource.Component interface can be by transmitting lock resource of the parameter relevant with key to shared resource
Record is taken to be operated.Operation to lock resource occupation record, it may include lock (lock), unlock (unlock), renew lock
(renewLock) type such as, correspondingly, component interface may include to lock (lock), unblock (unlock), renew lock
(renewLock) API such as.
When some shared resource of application request, the key for representing the shared resource is spliced into by rules abstraction, using key as
The lock operation API that parameter call Lock_client.jar is provided.Component Lock_client.jar passes through according to lock resource key
Sql inquiries/renewal/insertion corresponds to resource lock record, and when sql renewals/insertion success, then explanation lock operation requests are successful, otherwise
Failure.
Alternatively, shared resource can be pressed to character string of the rules abstraction for tree structure as resource key, can be similar to text
Part bibliographic structure, such as:/ system/business/scene/operation/task ID.Be abstracted in such a way, can comparison image clearly
Represent resource between ownership and hierarchical relationship, also can be relatively good ensure that resource key is not repeated.According to the actual feelings of resource
Condition, the tree directory structure level taken out is changeable, flexible Application, as long as unique resource can be identified conveniently.
Certainly, also shared resource can not be restricted by rules abstraction into other types of resource key, the embodiment of the present application to this.
It should be understood that shared resource, it may include cpu resource, network port resource, peripheral resources, storage resource etc..In addition,
Shared resource may also include operating resource.For ease of understanding, the operating resource that is used in batch processing system has been illustrated below
A kind of resource key abstract ways, as shown in table 1:
Table 1:
| Usage scenario |
Resource key |
| Tasks carrying |
/Fundmng/TSKHDL/EXECUTE/TSK_20170207_01102818 |
| Task burst performs |
/Fundmng/TSKHDL/EXECUTE/SLC_20130606_00002781 |
| Task scan |
/Fundmng/TSKHDL/SCAN |
| Task creation |
/Fundmng/TSKHDL/CREATE |
Furthermore, it is to be understood that in resource lock table, it may include multiple fields, lock mark, lock user and lock expired time.Its
In, lock mark, i.e., lock mark, resource key as shown in Figure 2 corresponding to shared resource;User is locked, i.e., shared resource is in resource
The current lock user of lock token record;Lock expired time, i.e. lock expired time of the shared resource in resource lock token record.Certainly,
Other fields are there is likely to be, for example, resource lock table Record ID, etc..A kind of data structure of resource lock table such as institute of table 2
Show:
Table 2:
| Field name |
Explanation |
Remarks |
| Id |
Lock id |
The LCK_ dates _ sequence number |
| lockKey |
Lock resource key |
Lock unique mark, unique index field |
| lockClient |
Lock user |
Server domain name:Thread number |
| expiredTime |
Lock expired time |
More than this time, not revival is locked |
Based on resource lock table structure above and component interface, with reference to Fig. 3-Fig. 5, embodiment illustrated in fig. 1 is illustrated.
In Fig. 3-embodiment illustrated in fig. 5, resource lock table name res_lock_table as shown in Figure 2, resource lock literary name section such as table 2
Shown field structure.
Fig. 3 is the detail flowchart of the access control method of one embodiment shared resource of the application.The application is implemented
The scheme of example, it can be applied to lock shared resource to take in the scene of shared resource.Fig. 3 method may include:
302, construction lock Resource Key.
In the embodiment of the present application, the shared resource that shared resource access control apparatus be able to will access according to user, structure
That makes the shared resource makes lock Resource Key.During construction lock Resource Key, only it need to ensure that Resource Key can be marked uniquely
Know shared resource, corresponded with shared resource, its specific implementation is not restricted.For example, shared resource can be passed through
The information such as title, numbering, the device identification, determine Resource Key, etc..
304, locked and recorded according to keyword query.
After keyword is obtained, it can be locked and recorded according to keyword query.It is KEY that keyword, which might as well be assumed,.
Now, SQL statement " select*from res_lock_table where lockey=KEY " be can perform.When
So, it should be appreciated that what SQL statement herein was merely exemplary, in the application of reality, the SQL statement specifically performed may not
Together.
306, judge that record whether there is.
If performing SQL statement returns to 0 record, illustrate that record is not present, then perform step 308.
If performing SQL statement returns to 1 record, illustrate that record is present, perform step 310.
308, insertion lock record.
Record is locked if there is no corresponding to KEY, a record, lock resource therein can be inserted in res_lock_table
Key (lockKey) is KEY, locks user (lockclient) for that will access the user of the shared resource, expired time
(expiredTime) prepare to stop the time for accessing shared resource for user is estimated, TIME might as well be assumed to be.In addition, can also be
Write-in lock id (ID) in the record, for example, LCK_ dates _ sequence number, etc..
After performing insertion operation, step 318 is performed.
310, judge whether same lock user.
If there is record is locked corresponding to KEY, then the lock user in lock record can be obtained, and judge that the lock of lock record makes
User and the whether same lock user of user for preparing access shared resource.
If it is, perform step 312.
If it is not, then perform step 314.
312, update expired time.
If the lock user for locking record is same lock user with the user for preparing to access shared resource, directly more
Expired time (expiredTime) in new lock record prepares to stop the time for accessing shared resource for user is estimated.
314, judge whether lock is overtime.
If the lock user for locking record is not same lock user with the user for preparing to access shared resource, obtain
The expired time of record is locked, to judge whether lock is overtime.
If current time is later than expired time, illustrate that lock has not timed out, perform step 320.
If current time earlier than or equal to expired time, illustrates lock time-out, step 316 is performed.
316, user and expired time are locked in renewal.
If current time earlier than or equal to expired time, lock user (lockclient) is updated to access
The user of the shared resource, expired time (expiredTime) be updated to user it is estimated prepare to stop to access shared resource when
Between.
After renewal, step 318 is performed.
318, lock successfully.
After locking successfully, it can return to expression and lock successful information, for example, returning to the lock ID of lock record.
320, lock failure.
After locking failure, the information for representing to lock failure is can return to, for example, returning to null value or NULL.
It should be understood, of course, that in the embodiment of the present application, also using the tune of Lock_client.jar components as shown in Figure 2
Use interface.In the embodiment of the present application, it is necessary to two parameters of keyword and expired time.Lock_client.jar might as well be assumed
Middle locking function is lock functions, then can realize the function shown in step 304-320 by calling lock (KEY, TIME).
Shared resource access control apparatus can judge whether to lock successfully according to lock (KEY, the TIME) results returned.Example
Such as, when lock (KEY, TIME) returns to a lock ID, show to lock successfully, shared resource corresponding to KEY can be visited
Ask;When lock (KEY, TIME) returns to null value or null, show to lock failure, it is impossible to carry out shared resource corresponding to KEY
Access.
Fig. 4 is the detail flowchart of the access control method of one embodiment shared resource of the application.The application is implemented
The scheme of example, it can be applied to renew the resource lock of shared resource with the scene of lasting occupancy shared resource.Fig. 4 side
Method may include:
402, construction lock Resource Key.
The specific implementation of step 402 refers to step 302 corresponding to Fig. 3.
404, locked and recorded according to keyword query.
The specific implementation of step 404 refers to step 304 corresponding to Fig. 3.
406, judge that record whether there is.
If record is present, step 408 is performed.
If record is not present, step 414 is performed.
408, judge whether same lock user.
If there is record is locked corresponding to KEY, then the lock user in lock record can be obtained, and judge that the lock of lock record makes
User and the whether same lock user of user for preparing access shared resource.
If it is, perform step 410.
If not, perform step 414.
410, update expired time.
The specific implementation of step 410 refers to Fig. 3 step 312.
412, renew success.
After renewing successfully, it can return to expression and lock successful information, for example, returning to the lock ID of lock record.
414, renew failure.
After renewing unsuccessfully, the information for representing to renew failure is can return to, for example, returning to null value or NULL.
It should be understood, of course, that in the embodiment of the present application, it can also use Lock_client.jar components as shown in Figure 2
Calling interface.In the embodiment of the present application, it is necessary to two parameters of keyword and expired time.Lock_ might as well be assumed
It is reNewLock functions that function is renewed in client.jar, then can realize step by calling reNewLock (KEY, TIME)
Function shown in 404-414.
Shared resource access control apparatus can judge whether to renew success according to lock (KEY, the TIME) results returned.Example
Such as, when reNewLock (KEY, TIME) returns to a lock ID, show to renew success, can continue to sharing money corresponding to KEY
Source conducts interviews;When reNewLock (KEY, TIME) returns to null value or null, show to renew failure, it is impossible to continue to KEY pairs
The shared resource answered conducts interviews.
Fig. 5 is the detail flowchart of the access control method of one embodiment shared resource of the application.The application is implemented
The scheme of example, it can be applied to discharge the resource lock of shared resource to cancel in the scene for taking shared resource.Fig. 5 side
Method may include:
502, construction lock Resource Key.
The specific implementation of step 502 refers to step 302 corresponding to Fig. 3.
504, locked and recorded according to keyword query.
The specific implementation of step 504 refers to step 304 corresponding to Fig. 3.
506, judge that record whether there is.
If record is present, step 508 is performed.
If record is not present, step 516 is performed.
508, judge whether same lock user.
If there is record is locked corresponding to KEY, then the lock user in lock record can be obtained, and judge that the lock of lock record makes
User and the whether same lock user of user for preparing access shared resource.
If it is, perform step 510.
If not, perform step 516.
510, delete lock record.
512, judge whether deletion succeeds.
If deleted successfully, step 514 is performed.
If deleting failure, step 516 is performed.
514, unlock successfully.
If unlocked successfully, the successful information of unblock can return to.Failure is represented such as 1 represent successfully, 0, then returns to 1.
516, unblock failure.
If unblock failure, can return to the information of unblock failure.Failure is represented such as 1 represent successfully, 0, then returns to 0.
It should be understood, of course, that in the embodiment of the present application, it can also use Lock_client.jar components as shown in Figure 2
Calling interface.In the embodiment of the present application, it is necessary to keyword parameter.It might as well assume that function is unlocked in Lock_client.jar is
UnLock functions, then the function shown in step 504-516 can be realized by calling unLock (KEY).
Shared resource access control apparatus can judge whether to renew success according to unLock (KEY) results returned.For example,
When unLock (KEY) returns to 1, show to unlock successfully;When unLock (KEY) returns to 0, show unblock failure.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the action recorded in detail in the claims or step can be come according to different from the order in embodiment
Perform and still can realize desired result.In addition, the process described in the accompanying drawings not necessarily require show it is specific suitable
Sequence or consecutive order could realize desired result.In some embodiments, multitasking and parallel processing be also can
With or be probably favourable.
Fig. 6 is the structural representation of one embodiment electronic equipment of the application.Fig. 6 is refer to, in hardware view, the electricity
Sub- equipment includes processor, alternatively also includes internal bus, network interface, memory.Wherein, memory may include interior
Deposit, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to also including non-volatile memories
Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, the electronic equipment is also possible that other
Hardware required for business.
Processor, network interface and memory can be connected with each other by internal bus, and the internal bus can be ISA
(Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, EISA) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..For ease of representing, only represented in Fig. 6 with a four-headed arrow, it is not intended that an only bus or a type of
Bus.
Memory, for depositing program.Specifically, program can include program code, and described program code includes calculating
Machine operational order.Memory can include internal memory and nonvolatile memory, and provide instruction and data to processor.
Processor read from nonvolatile memory corresponding to computer program into internal memory then run, in logical layer
Shared resource access control apparatus is formed on face.Processor, the program that memory is deposited is performed, and it is following specifically for performing
Operation:
Access request according to user to shared resource, obtain lock mark corresponding to the shared resource;
Safeguard that resource lock corresponding to lock mark takes record in resource lock table, the resource lock table is used to store shared money
The resource lock in source takes record;
According to the maintenance result, access rights of the user to the shared resource are determined.
The method that the above-mentioned shared resource access control apparatus as disclosed in the application Fig. 1, Fig. 3-embodiment illustrated in fig. 5 performs
It can apply in processor, or realized by processor.Processor is probably a kind of IC chip, has the place of signal
Reason ability.In implementation process, each step of the above method can by the integrated logic circuit of the hardware in processor or
The instruction of software form is completed.Above-mentioned processor can be general processor, including central processing unit (Central
Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be Digital Signal Processing
Device (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated
Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other can
Programmed logic device, discrete gate or transistor logic, discrete hardware components.It can realize or perform the application implementation
Disclosed each method, step and logic diagram in example.General processor can be that microprocessor or the processor can also
It is any conventional processor etc..The step of method with reference to disclosed in the embodiment of the present application, can be embodied directly in hardware decoding
Computing device is completed, or performs completion with the hardware in decoding processor and software module combination.Software module can position
In random access memory, flash memory, read-only storage, programmable read only memory or electrically erasable programmable memory, register
Deng in the ripe storage medium in this area.The storage medium is located at memory, and processor reads the information in memory, with reference to it
Hardware completes the step of above method.
The electronic equipment can also carry out Fig. 1 method, and realize shared resource access control apparatus in Fig. 1, Fig. 3-Fig. 5 institutes
Show the function of embodiment, the embodiment of the present application will not be repeated here.
Certainly, in addition to software realization mode, the electronic equipment of the application is not precluded from other implementations, for example patrols
Collect mode of device or software and hardware combining etc., that is to say, that the executive agent of following handling process is not limited to each patrol
Collect unit or hardware or logical device.
The embodiment of the present application also proposed a kind of computer-readable recording medium, the computer-readable recording medium storage one
Individual or multiple programs, one or more programs include instruction, and the instruction is when the portable electronic for being included multiple application programs
When equipment performs, the method for portable electric appts execution embodiment illustrated in fig. 1 can be made, and specifically for performing with lower section
Method:
Access request according to user to shared resource, obtain lock mark corresponding to the shared resource;
Safeguard that resource lock corresponding to lock mark takes record in resource lock table, the resource lock table is used to store shared money
The resource lock in source takes record;
According to the maintenance result, access rights of the user to the shared resource are determined.
Fig. 7 is the structural representation of one embodiment shared resource access control apparatus 700 of the application.It refer to Fig. 7,
In a kind of Software Implementation, shared resource access control apparatus 700 may include:
Acquiring unit 710, the access request according to user to shared resource, obtain lock mark corresponding to the shared resource;
Maintenance unit 720, safeguard that resource lock corresponding to lock mark takes record in resource lock table, the resource lock table is used
Record is taken in the resource lock of storage shared resource;
Determining unit 730, according to the maintenance result, determine access rights of the user to the shared resource.
In the embodiment of the present application, by safeguarding resource lock of the shared resource in resource lock table according to the access request of user
Record is taken, then according to safeguarding that result determines the access rights of user, so as to realize resource in a manner of relatively simple
Lock, reduces the cost for realizing resource lock.
Alternatively, as one embodiment, the resource lock, which takes record, to be included the lock user of the shared resource and locked
Time phase, maintenance unit 720 are specifically used for:
Safeguard that resource lock corresponding to lock mark takes the lock user in record and lock expired time in resource lock table.
In a kind of specific implementation of the embodiment of the present application, maintenance unit 720 is specifically used for:If the resource lock table
In be not present the lock mark corresponding to resource lock take record, then increase in the resource lock table lock mark corresponding to resource lock
Record is taken, lock user is recorded as the user, and record lock expired time;
Wherein it is determined that unit 730 is specifically used for:If the maintenance result represents that increasing resource lock occupancy records successfully,
Determine that the user possesses access rights to the shared resource.
In another specific implementation of the embodiment of the present application, maintenance unit 720 is specifically used for:If the resource lock
Resource lock corresponding to lock mark in table being present takes record, and the lock user of resource lock occupancy record is the user, then
Renewal lock expired time;
Wherein it is determined that unit 730 is specifically used for:If the maintenance result represents that updating resource lock occupancy records successfully,
Determine that the user possesses access rights to the shared resource.
In another specific implementation of the embodiment of the present application, maintenance unit 720 is specifically used for:If the resource lock
Resource lock corresponding to lock mark in table being present takes record, and current time is more than or equal to lock expired time, then renewal should
The lock user that resource lock takes record is the user, and updates lock expired time;
Wherein it is determined that unit 730 is specifically used for:If the maintenance result represents that updating resource lock occupancy records successfully,
Then determine that the user does not possess access rights to the shared resource.
In another specific implementation of the embodiment of the present application, maintenance unit 720 is specifically used for:If the resource lock
Resource lock corresponding to lock mark in table being present takes record, and the lock user of resource lock occupancy record is not the user,
And current time is less than lock expired time, then the resource lock is not updated and takes record;
Wherein it is determined that unit 730 is specifically used for:If the maintenance result represents that not taking record to the resource lock is carried out more
Newly, it is determined that the user does not possess access rights to the shared resource.
Shared resource access control apparatus 700 also includes releasing unit 740, after the access to the shared object terminates,
Discharge the lock resource that resource lock corresponding to the shared resource takes record.
Alternatively, as one embodiment, acquiring unit 710 be used to reacquiring the shared resource corresponding to resource lock account for
With record;If the lock user that the resource lock that releasing unit 740 is used to reacquire is taken in record is the user, delete
Recorded except the resource lock takes.
Alternatively, as one embodiment, acquiring unit 710 be used to reacquiring the shared resource corresponding to resource lock account for
With record;If the lock user that the resource lock that releasing unit 740 is used to reacquire is taken in record is not the user,
Deletion action is not performed directly to return.
Alternatively, the resource lock table is the resource lock table in database.
Alternatively, multiple access requests of the shared resource come from same distributed system;Or the shared resource
Multiple access requests come from different distributed systems.
In a word, the preferred embodiment of the application is the foregoing is only, is not intended to limit the protection domain of the application.
All any modification, equivalent substitution and improvements within spirit herein and principle, made etc., should be included in the application's
Within protection domain.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity,
Or realized by the product with certain function.One kind typically realizes that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment
The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for system
For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.