1 4 package com.tc.test.transactions; 5 6 9 public class NullTransactionalObject implements TransactionalObject { 10 11 private static class NullContext implements TransactionalObject.Context { 12 } 14 15 private static final Context CONTEXT = new NullContext(); 16 17 public Context startWrite(Object value) { 18 return CONTEXT; 19 } 20 21 public Context startWrite(Object value, long now) { 22 return CONTEXT; 23 } 24 25 public void endWrite(Context rawWrite) { 26 } 28 29 public void endWrite(Context rawWrite, long now) { 30 } 32 33 public Context startRead() { 34 return CONTEXT; 35 } 36 37 public Context startRead(long now) { 38 return CONTEXT; 39 } 40 41 public void endRead(Context rawRead, Object result) { 42 } 44 45 public void endRead(Context rawRead, Object result, long now) { 46 } 48 49 } 50 | Popular Tags |