Package com.arjuna.ats.txoj

Examples of com.arjuna.ats.txoj.Lock


    {
      AtomicTransaction atomicTransaction = new AtomicTransaction();

      atomicTransaction.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
        atomicTransaction.commit(true);
      }
      else
      {
View Full Code Here


  public void get(IntHolder value)
      throws InvocationException
  {
    try
    {
      if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
      {
        value.value = _value;
      }
      else
      {
View Full Code Here

  public void set(int value)
      throws InvocationException
  {
    try
    {
      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
        _value = value;
      }
      else
      {
View Full Code Here

  public void increase()
      throws InvocationException
  {
    try
    {
      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
        _value++;
      }
      else
      {
View Full Code Here

    {
      AtomicTransaction atomicTransaction = new AtomicTransaction();

      atomicTransaction.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
        atomicTransaction.commit(true);
      }
      else
      {
View Full Code Here

      try
      {
        atomicTransaction.begin();

        if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
        {
          value.value = _values[x][y];
          atomicTransaction.commit(true);
        }
        else
View Full Code Here

      try
      {
        atomicTransaction.begin();

        if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
        {
          _values[x][y] = value;
          atomicTransaction.commit(true);
        }
        else
View Full Code Here

    {
      AtomicTransaction atomicTransaction = new AtomicTransaction();

      atomicTransaction.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
        atomicTransaction.commit(true);
      }
      else
      {
View Full Code Here

      interposition.registerTransaction(ctrl);

      try
      {
        if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
        {
          value.value = _values[x][y];
        }
        else
        {
View Full Code Here

      com.arjuna.ats.jts.ExplicitInterposition interposition = new com.arjuna.ats.jts.ExplicitInterposition();

      interposition.registerTransaction(ctrl);
      try
      {
        if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
        {
          _values[x][y] = value;
        }
        else
        {
View Full Code Here

TOP

Related Classes of com.arjuna.ats.txoj.Lock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.