net.sf.lucis.core.impl
Class DefaultWriter

java.lang.Object
  extended by net.sf.lucis.core.impl.DefaultWriter
All Implemented Interfaces:
Writer

public final class DefaultWriter
extends Object
implements Writer

Default writer implementation.

Author:
Andres Rodriguez.

Constructor Summary
DefaultWriter()
           
DefaultWriter(Supplier<IndexWriterConfig> config)
           
 
Method Summary
 String getName()
          Returns the name of the object or the class name if no one was provided.
 void setName(String name)
          Sets the object name.
<T> IndexStatus
write(Store<T> store, Batch<T> batch)
          Applies a batch of operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWriter

public DefaultWriter()

DefaultWriter

public DefaultWriter(Supplier<IndexWriterConfig> config)
Method Detail

write

public <T> IndexStatus write(Store<T> store,
                             Batch<T> batch)
                  throws InterruptedException
Description copied from interface: Writer
Applies a batch of operations.

Specified by:
write in interface Writer
Type Parameters:
T - Checkpoint type.
Parameters:
store - Destination store.
batch - Batch to apply.
Returns:
The final index status or null if the batch is null or the final checkpoint is equals to the initial one.
Throws:
InterruptedException - if the current task has been interrupted.

getName

public final String getName()
Returns the name of the object or the class name if no one was provided.


setName

public final void setName(String name)
Sets the object name.



Copyright © 2013. All Rights Reserved.