Package org.jboss.ha.timestamp

Examples of org.jboss.ha.timestamp.TimestampDiscrepancy


      return equalAllowed ? senderTime > currentTime :senderTime > currentTime;
   }
  
   private TimestampDiscrepancy getTimestampDiscrepancy(String originatingNode, boolean allowStatusCheck)
   {
      TimestampDiscrepancy td = timestampService.getTimestampDiscrepancy(originatingNode, allowStatusCheck);
      // If we don't have a record for the originator, use NO_DISCREPANCY and hope for the best
      return td == null ? TimestampDiscrepancy.NO_DISCREPANCY : td;
   }
View Full Code Here


      {
         return true;
      }
      else
      {
         TimestampDiscrepancy addDiscrepancy = getTimestampDiscrepancy(toAdd.getOriginatingNode(), false);
         long adjustedTimestamp = addDiscrepancy.getMinLocalTimestamp(toAdd.getTimestamp());
         return adjustedTimestamp > System.currentTimeMillis() - getRemovalTrackingTime();
      }
   }
View Full Code Here

    * adjusted timestamp of the <code>current</code> item.
    */
   protected boolean acceptReincarnation(RepositoryItemMetadata reincarnation, RepositoryItemMetadata current,
         boolean merge)
   {
      TimestampDiscrepancy addDiscrepancy = getTimestampDiscrepancy(reincarnation.getOriginatingNode(), false);
      TimestampDiscrepancy deadDiscrepancy = getTimestampDiscrepancy(current.getOriginatingNode(), false);
      return isChangeMoreRecent(reincarnation, current, addDiscrepancy, deadDiscrepancy, false);
   }
View Full Code Here

      if (sendersView == null)
      {
         return false;
      }

      TimestampDiscrepancy senderTimestampDiscrepancy = getTimestampDiscrepancy(sendersView.getOriginatingNode(), false);
      TimestampDiscrepancy currentTimestampDiscrepancy = getTimestampDiscrepancy(current.getOriginatingNode(), false);
     
      return isChangeMoreRecent(sendersView, current, senderTimestampDiscrepancy, currentTimestampDiscrepancy, true);
   }
View Full Code Here

    * adjusted timestamp of the <code>current</code> item.
    */
   protected boolean acceptUpdate(RepositoryItemMetadata update, RepositoryItemMetadata current,
         boolean merge)
   {
      TimestampDiscrepancy updateDiscrepancy = getTimestampDiscrepancy(update.getOriginatingNode(), false);
      TimestampDiscrepancy currentTimestampDiscrepancy = getTimestampDiscrepancy(current.getOriginatingNode(), false);
     
      return isChangeMoreRecent(update, current, updateDiscrepancy, currentTimestampDiscrepancy, false);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ha.timestamp.TimestampDiscrepancy

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.