@Test public void testCreateExclusionSuccess() { repository.createExclusion(Experiment.ID.newInstance(), Experiment.ID.newInstance()); }
@Override public void createExclusion(Experiment.ID baseID, Experiment.ID pairID) throws RepositoryException { LOGGER.debug("Create exclusions for {}", new Object[]{baseID, pairID}); try { BatchStatement batchStatement = new BatchStatement(); batchStatement.add(mutexAccessor.createExclusion(baseID.getRawID(), pairID.getRawID())); batchStatement.add(mutexAccessor.createExclusion(pairID.getRawID(), baseID.getRawID())); session.execute(batchStatement); } catch (Exception e) { LOGGER.error("Error while create exclusions for {}", new Object[]{baseID, pairID}, e); throw new RepositoryException("Could not insert the exclusion \"" + baseID + "\"", e); } }
CassandraMutexRepository implements MutexRepository { @Override public void createExclusion(Experiment.ID baseID, Experiment.ID pairID) throws RepositoryException { LOGGER.debug("Create exclusions for {}", new Object[]{baseID, pairID}); try { BatchStatement batchStatement = new BatchStatement(); batchStatement.add(mutexAccessor.createExclusion(baseID.getRawID(), pairID.getRawID())); batchStatement.add(mutexAccessor.createExclusion(pairID.getRawID(), baseID.getRawID())); session.execute(batchStatement); } catch (Exception e) { LOGGER.error("Error while create exclusions for {}", new Object[]{baseID, pairID}, e); throw new RepositoryException("Could not insert the exclusion \"" + baseID + "\"", e); } } }
CassandraMutexRepository implements MutexRepository { @Override public void createExclusion(Experiment.ID baseID, Experiment.ID pairID) throws RepositoryException { LOGGER.debug("Create exclusions for {}", new Object[]{baseID, pairID}); try { BatchStatement batchStatement = new BatchStatement(); batchStatement.add(mutexAccessor.createExclusion(baseID.getRawID(), pairID.getRawID())); batchStatement.add(mutexAccessor.createExclusion(pairID.getRawID(), baseID.getRawID())); session.execute(batchStatement); } catch (Exception e) { LOGGER.error("Error while create exclusions for {}", new Object[]{baseID, pairID}, e); throw new RepositoryException("Could not insert the exclusion \"" + baseID + "\"", e); } } @Inject  CassandraMutexRepository(
            ExperimentAccessor experimentAccessor,
            ExclusionAccessor mutexAccessor,
            CassandraDriver driver); }
CassandraMutexRepository implements MutexRepository { @Override public void createExclusion(Experiment.ID baseID, Experiment.ID pairID) throws RepositoryException { LOGGER.debug("Create exclusions for {}", new Object[]{baseID, pairID}); try { BatchStatement batchStatement = new BatchStatement(); batchStatement.add(mutexAccessor.createExclusion(baseID.getRawID(), pairID.getRawID())); batchStatement.add(mutexAccessor.createExclusion(pairID.getRawID(), baseID.getRawID())); session.execute(batchStatement); } catch (Exception e) { LOGGER.error("Error while create exclusions for {}", new Object[]{baseID, pairID}, e); throw new RepositoryException("Could not insert the exclusion \"" + baseID + "\"", e); } } @Inject  CassandraMutexRepository(
            ExperimentAccessor experimentAccessor,
            ExclusionAccessor mutexAccessor,
            CassandraDriver driver); @Override List<Experiment.ID> getExclusionList(Experiment.ID experimentID); @Override void deleteExclusion(Experiment.ID base, Experiment.ID pair); @Override void createExclusion(Experiment.ID baseID, Experiment.ID pairID); @Override ExperimentList getExclusions(Experiment.ID base); @Override ExperimentList getNotExclusions(Experiment.ID base); @Override Map<Experiment.ID, List<Experiment.ID>> getExclusivesList(Collection<Experiment.ID> experimentIds); }
CassandraMutexRepository implements MutexRepository { @Override public void createExclusion(Experiment.ID baseID, Experiment.ID pairID) throws RepositoryException { LOGGER.debug("Create exclusions for {}", new Object[]{baseID, pairID}); try { BatchStatement batchStatement = new BatchStatement(); batchStatement.add(mutexAccessor.createExclusion(baseID.getRawID(), pairID.getRawID())); batchStatement.add(mutexAccessor.createExclusion(pairID.getRawID(), baseID.getRawID())); session.execute(batchStatement); } catch (Exception e) { LOGGER.error("Error while create exclusions for {}", new Object[]{baseID, pairID}, e); throw new RepositoryException("Could not insert the exclusion \"" + baseID + "\"", e); } } @Inject  CassandraMutexRepository(
            ExperimentAccessor experimentAccessor,
            ExclusionAccessor mutexAccessor,
            CassandraDriver driver); @Override List<Experiment.ID> getExclusionList(Experiment.ID experimentID); @Override void deleteExclusion(Experiment.ID base, Experiment.ID pair); @Override void createExclusion(Experiment.ID baseID, Experiment.ID pairID); @Override ExperimentList getExclusions(Experiment.ID base); @Override ExperimentList getNotExclusions(Experiment.ID base); @Override Map<Experiment.ID, List<Experiment.ID>> getExclusivesList(Collection<Experiment.ID> experimentIds);  }