Java 8 IntHolder - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 IntHolder class.

This code example shows how to use the following methods:
current.commit(false);
 
            current.begin();
 
            IntHolder val = new IntHolder(-1);
 
            if (stackVar.pop(val) == 0)
            { 
                System.out.println("popped top of stack "+val.value);
 
                current.begin();
 
                stackVar.push(3);
 
                System.out.println("pushed 3 onto stack. Aborting nested action.");
 
                current.rollback();
 
                stackVar.pop(val);

5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			boolean correct = true;
 
			OTS.current().begin(); 
 
			IntHolder valueHolder1 = new IntHolder();
			IntHolder valueHolder2 = new IntHolder();
			service1.get(OTS.get_current().get_control(), valueHolder1);
			service2.get(OTS.get_current().get_control(), valueHolder2);
			correct = correct && (valueHolder1.value == 1);
			correct = correct && (valueHolder2.value == 1);
 
			OTS.current().commit(true); 
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			boolean correct = true;
 
			OTS.current().begin(); 
 
			IntHolder valueHolder1 = new IntHolder();
			IntHolder valueHolder2 = new IntHolder();
			service1.get(OTS.current().get_control(), valueHolder1);
			service2.get(OTS.current().get_control(), valueHolder2);
			correct = correct && (valueHolder1.value == 0);
			correct = correct && (valueHolder2.value == 0);
 
			OTS.current().commit(true); 
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			boolean correct = true;
 
			OTS.current().begin(); 
 
			IntHolder valueHolder1 = new IntHolder();
			IntHolder valueHolder2 = new IntHolder();
			service1.get(valueHolder1);
			service2.get(valueHolder2);
			correct = correct && (valueHolder1.value == 0);
			correct = correct && (valueHolder2.value == 0);
 
			OTS.current().commit(true); 
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
			boolean correct = true;
 
			OTS.current().begin(); 
 
			IntHolder valueHolder1 = new IntHolder();
			IntHolder valueHolder2 = new IntHolder();
			service1.get(valueHolder1);
			service2.get(valueHolder2);
			correct = correct && (valueHolder1.value == 1);
			correct = correct && (valueHolder2.value == 1);
 
			OTS.current().commit(true); 
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
				System.out.println("Failed");
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			Thread.sleep(Delays.recoveryDelay());
 
			boolean correct = true;
 
			IntHolder valueHolder = new IntHolder();
			service.get(valueHolder);
 
			// 
			// recovery should have rolled the transaction back. 
			// the set(1) change should therefore have been undone. 
			// 
			correct = correct && (valueHolder.value == 0);
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			Thread.sleep(Delays.recoveryDelay());
 
			boolean correct = true;
 
			IntHolder valueHolder = new IntHolder();
			service.get(valueHolder);
 
			// 
			// recovery should have completed the transaction and 
			// therefore dropped the locks on the value 
			// 
			correct = correct && (valueHolder.value == 1);
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
			Counter counter2 = CounterHelper.narrow(ORBInterface.orb().string_to_object(counterIOR2));
 
			IntHolder value1 = new IntHolder();
			counter1.get(value1);
 
			IntHolder value2 = new IntHolder();
			counter2.get(value2);
 
			if ((value1.value == expectedValue) && (value2.value == expectedValue))
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
				System.out.println("Failed");
			} 
		} 
		catch (Exception exception)
		{ 
			System.out.println("Failed");
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			boolean correct = true;
 
			OTS.current().begin(); 
 
			IntHolder valueHolder = new IntHolder();
			service.get(valueHolder);
			correct = correct && (valueHolder.value == 1);
 
			OTS.current().commit(true); 
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
				System.out.println("Failed");
			} 
		} 
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 
			Thread.sleep(Delays.recoveryDelay());
 
			boolean correct = true;
 
			IntHolder valueHolder = new IntHolder();
			service.get(valueHolder); // non-tx
 
			correct = correct && (valueHolder.value == 1);
 
			if (correct)
			{ 
				System.out.println("Passed");
			} 
			else 
			{ 
				System.out.println("Failed");
			} 
		} 
		catch (Exception exception)
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Java 8 IntHolder Methods: