Package org.goobi.production.flow.statistics.hibernate

Examples of org.goobi.production.flow.statistics.hibernate.UserProjectFilter$Dispatcher


* Created by Tronok on 29.04.14.
*/
public class DispatcherTest {
    @Test
    public void testDispatcherNormal2Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here


        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal3Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal4Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

   * @return instance of {@link StatisticsMode.PRODUCTION} {@link StatisticsManager}
   */

  public StatisticsManager getStatisticsManager1() {
    if (this.statisticsManager1 == null) {
      this.statisticsManager1 = new StatisticsManager(StatisticsMode.PRODUCTION, new UserProjectFilter(this.myProjekt.getId()), FacesContext
          .getCurrentInstance().getViewRoot().getLocale());
    }
    return this.statisticsManager1;
  }
View Full Code Here

   *
   * @return instance of {@link StatisticsMode.THROUGHPUT} {@link StatisticsManager}
   */
  public StatisticsManager getStatisticsManager2() {
    if (this.statisticsManager2 == null) {
      this.statisticsManager2 = new StatisticsManager(StatisticsMode.THROUGHPUT, new UserProjectFilter(this.myProjekt.getId()), FacesContext
          .getCurrentInstance().getViewRoot().getLocale());
    }
    return this.statisticsManager2;
  }
View Full Code Here

   *
   * @return instance of {@link StatisticsMode.CORRECTIONS} {@link StatisticsManager}
   */
  public StatisticsManager getStatisticsManager3() {
    if (this.statisticsManager3 == null) {
      this.statisticsManager3 = new StatisticsManager(StatisticsMode.CORRECTIONS, new UserProjectFilter(this.myProjekt.getId()), FacesContext
          .getCurrentInstance().getViewRoot().getLocale());
    }
    return this.statisticsManager3;
  }
View Full Code Here

   *
   * @return instance of {@link StatisticsMode.STORAGE} {@link StatisticsManager}
   */
  public StatisticsManager getStatisticsManager4() {
    if (this.statisticsManager4 == null) {
      this.statisticsManager4 = new StatisticsManager(StatisticsMode.STORAGE, new UserProjectFilter(this.myProjekt.getId()), FacesContext
          .getCurrentInstance().getViewRoot().getLocale());
    }
    return this.statisticsManager4;
  }
View Full Code Here

        this.projectProgressData.setCommonWorkflow(this.myProjekt.getWorkFlow());
        this.projectProgressData.setCalculationUnit(CalculationUnit.volumes);
        this.projectProgressData.setRequiredDailyOutput(this.getThroughputPerDay());
        this.projectProgressData.setTimeFrame(this.getMyProjekt().getStartDate(), this.getMyProjekt().getEndDate());
        this.projectProgressData.setDataSource(new UserProjectFilter(this.myProjekt.getId()));

        if (this.projectProgressImage == null) {
          this.projectProgressImage = "";
        }
      } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.goobi.production.flow.statistics.hibernate.UserProjectFilter$Dispatcher

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.