Friday 15 February 2013

java - Real life use and explanation of the AtomicLongFieldUpdate class -


Do anyone know of any real life usage in the classroom? I have read the details, but I have not understood enough about it. Why should I know this? For curiosity and OPPP preparation.

Thanks in advance.

You can think of a cost ladder for:

  • Typical, but unsafe for multi-threaded access
  • Unstable long : more expensive, safe for multi-threaded access. , Nuclear operation is not possible
  • atom long : multi-threaded access, the most expensive for nuclear operations, safe

    (when I 'Unsafe' or 'does not say possible 'I mean,' without any external mechanism, such as synchronization.)

    In cases where multiple-threaded access is needed, but most operations read or write simply, only some nuclear operations are required. You can create a static instance of AtomicLongFieldUpdate and you can use it when the Atomic Update is required Memory / Runtime Overhead is similar to the simple volatile variable, Parma In addition to the scheme operations, which are common AtomicLong Operations Order (or slightly more expensive).

    Here's one.

No comments:

Post a Comment