public void register(UUID transactionId,RepositoryConnection conn) throws RepositoryException {
synchronized (primaryCache) {
    if (primaryCache.getIfPresent(transactionId) == null) {
      final CacheEntry cacheEntry=new CacheEntry(conn);
      primaryCache.put(transactionId,cacheEntry);
      secondaryCache.put(transactionId,cacheEntry);
      logger.debug("registered transaction {} ",transactionId);
    }
 else {
      logger.error("transaction already registered: {}",transactionId);
      throw new RepositoryException("transaction with id " + transactionId.toString() + " already registered.");
    }
  }
}

public void register ( UUID transactionId , RepositoryConnection conn ) throws RepositoryException { synchronized ( primaryCache ) { if ( primaryCache . getIfPresent ( transactionId ) == null ) { final CacheEntry cacheEntry = new CacheEntry ( conn ) ; primaryCache . put ( transactionId , cacheEntry ) ; secondaryCache . put ( transactionId , cacheEntry ) ; logger . debug ( "registered transaction {} " , transactionId ) ; } else { logger . error ( "transaction already registered: {}" , transactionId ) ; throw new RepositoryException ( "transaction with id " + transactionId . toString ( ) + " already registered." ) ; } } }
register a new transaction with the given id and connection .
