Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:34:13+00:00 2026-05-27T23:34:13+00:00

What are atomic actions and why they are neccessary? Also, How are atomic actions

  • 0

What are atomic actions and why they are neccessary? Also, How are atomic actions implemented in Java?

My understanding is that in programming an atomic action is one that effectively happens all at one. An atomic action cannot stop in the middle it either happens completely or not at all.

For example, ordering an airline ticket online where two actions are required: payment and a seat reservation. The potential passenger must either.

  1. both pay and reserve a seat, OR
  2. neither pay nor reserve a seat
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:34:13+00:00Added an answer on May 27, 2026 at 11:34 pm

    Maybe you should think about transactions. Make some process but do not save changes until everything is in order. Like when you are withdrawing money from a machine, you follow a series of steps, before seeing changes on your account, i.e. Put your card, your password, say how much money you want, receive the money. If something fails in one of the steps, you dont see changes in your savings account, e.g. your password was incorrect, or you are trying to withdraw more money than what you have…

    You can read the java tutorial.
    http://docs.oracle.com/javase/tutorial/essential/concurrency/atomic.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The java memory model mandates that writing a int is atomic: That is, if
In terms of actual low level atomic instructions and memory fences (I assume they're
Can one transaction update two different TVar s in an atomic way? i.e. can
I want to implement an atomic function in C language, so that the process
I was recently reading about the Compare And Swap atomic action (CMPXCHG, .NET's Interlocked.CompareExchange,
Is there a way to perform a set of non-atomic actions on MongoDB server
Is the following comparison an atomic action? I.e., can it be reduced to a
How do atomic / volatile / synchronized work internally? What is the difference between
When we talk about atomic variables, such as C++11's atomic<> , is it lock
GCC's recent support for atomic operations (as described here ) is great, and is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.