Package org.hibernate.search.testsupport.concurrency

Examples of org.hibernate.search.testsupport.concurrency.ConcurrentRunner


  }

  @Test
  public void concurrentSerialization() throws Exception {
    final LuceneWorkSerializer serializer = extractSerializer();
    final ConcurrentRunner runner = new ConcurrentRunner( new TaskFactory() {
      @Override
      public Runnable createRunnable(int i) throws Exception {
        return new SerializingThread( serializer, SerializationTest.buildWorks() );
      }
    });
    runner.execute();
  }
View Full Code Here


  @Test
  public void concurrentDeserialization() throws Exception {
    final LuceneWorkSerializer serializer = extractSerializer();
    final byte[] serializedModel = serializer.toSerializedModel( SerializationTest.buildWorks() );
    final ConcurrentRunner runner = new ConcurrentRunner( new TaskFactory() {
      @Override
      public Runnable createRunnable(int i) throws Exception {
        return new DeserializingThread( serializer, serializedModel );
      }
    });
    runner.execute();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.testsupport.concurrency.ConcurrentRunner

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.