Code example for ObjectInput

Methods: readLong, readObject

0
      } 
 
      @Override 
      @SuppressWarnings("unchecked") 
      public DldGlobalTransaction readObject(ObjectInput input) throws IOException, ClassNotFoundException {
         DldGlobalTransaction ddGt = (DldGlobalTransaction) delegate.readObject(input);
         ddGt.setCoinToss(input.readLong());
         Object locksAtOriginObj = input.readObject();
         if (locksAtOriginObj == null) {
            ddGt.setLocksHeldAtOrigin(emptySet());
         } else { 
            ddGt.setLocksHeldAtOrigin((Set<Object>) locksAtOriginObj);
         } 
         return ddGt;
      } 
 
      @Override 
      public Integer getId() {
         return Ids.DEADLOCK_DETECTING_GLOBAL_TRANSACTION; 
      }