How does the Lock interface lock objects without synchronization?

Hello!
I am reading about the Lock interface (java.util.concurrent.locks.Lock). I have checked the source code of it but I cannot understand how the Lock interface can lock an object by using Lock.lock(). I cannot see any synchronizations in ReentrantLock or its dependency classes.
So how does the locking really works when using Lock interface?

Roxxor wrote:
Hello!
I am reading about the Lock interface (java.util.concurrent.locks.Lock). I have checked the source code of it but I cannot understand how the Lock interface can lock an object by using Lock.lock(). I cannot see any synchronizations in ReentrantLock or its dependency classes.
So how does the locking really works when using Lock interface?Either it does use Java's language-level synchronization, or it uses native methods that use platform-specific native atomicity features. Or both. Those are the only possibilities.

Similar Messages

  • I currently have a PC with Windows Outlook.  If I add an iPad to the mix, how does the iPad interface with Windows Outlook?

    I currently have a PC with Windows Outlook.  If I add an iPad to the mix, how does the iPad interface with Windows Outlook?

    Isn't Outlook simply an email client or a software application on a computer? You can add an email account - whatever email provider that you use - right on the iPad. You can sync your Outlook contacts and calendar if that is what you are asking about, but Outlook itself has nothing to do with the iPad.
    Message was edited by: Demo

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • How to use lock object? what we lock either total ztable or only record?

    Hi
    How to use lock object? what we lock either total ztable or only particular record?
    Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
    just tell me we will lock only particular record or total ztable?
    specify with example.
    Thanks.

    Hi
      Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.

  • How to create lock object?

    How to create lock object,- by going to se11 i have created but when i am going to sm12 to see wheather the table is locked or not then it is showing no entries found.
    Please help me how to create Lock object and see wheather thetable is lock is locked or not.
    Thnks in advance

    Hi venkateshwar,
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    •     Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    •     Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    •     Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    https://forums.sdn.sap.com/click.jspa?searchID=115258&messageID=2656474
    Do the following steps..
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    <b>Reward points if this helps.
    Manish</b>

  • Does the lock code for my iPad covered by my warranty?

    Does the lock code for my iPad covered by my warranty?

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • What does the lock icon on the iPod Touch in the upper right corner mean?

    Wbat does the lock icon in the upper right corner of the iPod Touch mean?
    How is it used?

    That means your iPod is locked, or will not rotate the screen when you rotate your iDevice. To turn it off, you double-tap the home button, swipe to the right and you'll see the same icon, but bigger. Tap that.
    That's all! Simple as 123!

  • How does the remote object connect to the correct host

    i have had a small doubt on how the remote reference manages to find the correct host to call the subsequent methods after a sucessful lookup.
    given a rebind or bind to the registry, the registry only stores the alias and the remote reference, now imagine a client calling a lookup on the registry would only get the remote reference, and not in which machine the remote object is found.
    what i wanted to know is how does the client or atleast the remote reference returned by the registry correctly connects to the machine where the remote object is located. i dont think its stored in the stub bcos the stub is a complie time stuff.
    i would be pleased to have a comprehensive answer for this.

    The membership in the group communication framework is always accurate and upto date.Up to date to the moment when you check. Not up to date to the moment when you make the RMI call.
    i could basically chk if this ip is available in the membership list.Complete waste of time. It doesn't matter what you check ahead of time, you are still trying to predict the future.
    And you still have to deal with ConnectException etc from the actual remote method call. And the way you will deal with that in your situation is exactly the same as what you were going to do if your ahead-of-time check failed.
    So just catch the exception(s) and deal with the problem there.

  • How to handle lock object in BDC  call transcation method?

    Hi,
    how to handle lock object in BDC  call transcation method?
    Thanks In advances.

    If you are updating Z-fields then you need to create a lock entry, before you use call transaction.
    After creating lock object, please use FM Enqueue_<lockname> before CALL transaction and FM Dequeue_<lockname> after you have commited your data.
    Thanks,
    Kartavya

  • Fm or metod that retrieve the lock object name from the table name

    HI ALL,
    there is FM or method that retrieve the lock object name from the table name ?
    Best regards
    Nina

    CALL FUNCTION 'ENQUEUE_REPORT'            
    EXPORTING                                
    gclient                     = sy-mandt   
    gname                       = 'RCTMV'         "Table Name
      GTARG                       = ' '       
      GUNAME                      = SY-UNAME  
    IMPORTING                                 
      number                      =           
      SUBRC                       =           
      TABLES                                  
        enq                         =  lt_seqg3
    EXCEPTIONS                               
       communication_failure       = 1        
       system_failure              = 2        
       OTHERS                      = 3

  • What does the lock symbol on top of the phone mean?

    What does the lock symbol on the top right hand corner mean?

    This is covered in the manual:
    http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf

  • How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?

    How long does the IPhone5c battery last for without hardly any usage with about 2/3 to 3/4 left?
    Has the side affect of charging, where the battery's life gradually decreases overall with each charge, been fixed ?

    Eric,
    They did say 12-14 hours, but as is always the case with such estimates, they invariably quote the 'best possible scenario' and almost never mirror 'real world' conditions.
    If, from a fully charged position, you simply switch on your nano, and set it to continuously play through a long set of songs, with EQ off, backlight off, modest volume (50%) don't touch it during playback, then you might just get somewhere near this figure - and if you don't then it's either not been conditioned properly or it's faulty.
    If you use it like me, daily for a couple of hours, with 2 secs backlight and switch songs regularly, using fairly high volumes then 6-8 hours is more likely. It'll even drain when it's not in use, even in sleep mode, albeit very slowly. They also tend to drain more quickly before they've been through their first few charge cycles (the conditioning period).
    Personally I haven't got a problem with this though I can understand why some people have. It's not very impressive in this respect. Apple should be able to come up with something much better - maybe they should talk to Sony

  • Tcode for displaying the locked objects

    Hi Experts,
    Can anybody please let me know what is the tcode for displaying the "locked objects" for a user? Thanks a ton for your help.

    Hi Sam,
    you can see the locked objects in E071 table.
    Reward if it helps,
    Satish

  • How does the Labview based program apply to computer which without Labview

    How does the Labview based program apply to computer which without Labview
    student number:1110340001

    SInce you list your "student number", you are probably using the student edition.
    You cannot build standalone executables with the student edition.
    You need LabVIEW professional. If you only have LabVIEW full, you need to purchase the application builder seperately.
    LabVIEW Champion . Do more with less code and in less time .

  • HT204406 how does the iTune icon present itself onto the dock. ?  And how does it play without being requested ?

    how does the iTune icon present itself onto the dock. ?
    And how does it play without being requested ?

    1. The SCB-68 is just a terminal block; it does not measure anything. The measurement is made on the board connected to the SCB-68.
    2. Computer-based data acquisistion devices and 480 V motors with solid state speed controls do not "play nice," as the kids say. The connections you are trying to make may well end up with a fried data acquisition board, fried computer, and MOST IMPORTANTLY a fried USER!
    Ground loop problems may produce noisy measurements or may destroy all the low current devices (like the computer) in the system.
    Signal conditioners are not only to reduce noise but also to provide safe isolation between the high voltage and high power parts of the system and the more sensitive parts.
    A thermocouple is a voltage generating device. The measurement system measures that voltage (typically millivolts) and independently measures the temperature of the "cold junction" of the thermocouple. The temperature at the hot junction of the thermocouple is calculated as Temperature(TC voltage difference) - Temperature(cold junction). If currents flow through the TC wires, due to ground potential differences between the motor frame and the computer ground for example, the voltage drop from Ohm's law is added to the TC voltage and will produce temperature errors. TC wire may have significantly higher resistance than wires used for most elelctrical signals so the interfering signal may be greater than the desired signal.
    Lynn

Maybe you are looking for

  • HP Support Assistant Windows 7 Home Premium HP Pavillion dv6 3132tx

    I downloaded the latest version of hp support assistant with all the security disabled ie trend micro windows firewall and windows defender and when i went to use the support assistant it shows no product name or number and it goes through a scan pro

  • End of contract is near, what happens to my unlimited data plan

    For past years I have upgraded my phone and signed a new contract, however since the last time I agreed to a contract Verizon did away with upgrading and keeping your unlimited data plan, so need-less-to-say I haven't upgraded. I have the Nation wide

  • Recovering OS 10.5.9 files  into OS 7 (Lion)

    My old G5 Power Mac crashed and I needed a new computer...fast...for my business.  I purchased a new iMac with Mac OS 10.7 (Lion).  My business files were back-upped on Time Capsule.  I set up the new iMac and used the Migration Assistant to recover

  • Issue with looping swf animation - conflicting settings

    I have a captivate project where I use a click box "stop" to inhibit the slide from moving to the next slide. (The click box set to no action, pause until user clicks.) This forces the user (using the player control) to click the "forward" button to

  • Link a button inside a movie clip to a scene

    I am trying to link a button that is inside a movie clip to a scene. The button has the instance name "cosmetic_btn" and the scene is called "Cosmetic Treatments". On my main timeline I have the code: cosmetic_btn.addEventListener(MouseEvent.CLICK, c