com.bigdata.search
Class TextIndexWriteProc

java.lang.Object
  extended by com.bigdata.btree.proc.AbstractIndexProcedure
      extended by com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
          extended by com.bigdata.search.TextIndexWriteProc
All Implemented Interfaces:
IIndexProcedure, IKeyArrayIndexProcedure, IParallelizableIndexProcedure, IMutableRelationIndexWriteProcedure, Externalizable, Serializable

public class TextIndexWriteProc
extends AbstractKeyArrayIndexProcedure
implements IParallelizableIndexProcedure, IMutableRelationIndexWriteProcedure

Writes on the text index.

Version:
$Id: TextIndexWriteProc.java 6237 2012-03-31 12:19:50Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
static class TextIndexWriteProc.IndexWriteProcConstructor
           
 
Nested classes/interfaces inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
AbstractKeyArrayIndexProcedure.ResultBitBuffer, AbstractKeyArrayIndexProcedure.ResultBitBufferCounter, AbstractKeyArrayIndexProcedure.ResultBitBufferHandler, AbstractKeyArrayIndexProcedure.ResultBuffer, AbstractKeyArrayIndexProcedure.ResultBufferHandler
 
Field Summary
 
Fields inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
DEBUG, log
 
Constructor Summary
  TextIndexWriteProc()
          De-serialization constructor.
protected TextIndexWriteProc(IRabaCoder keySer, IRabaCoder valSer, int fromIndex, int toIndex, byte[][] keys, byte[][] vals, boolean overwrite)
           
 
Method Summary
 Object apply(IIndex ndx)
          Run the procedure.
 boolean isReadOnly()
          Return true iff the procedure asserts that it will not write on the index.
protected  void readMetadata(ObjectInput in)
          Reads metadata written by AbstractKeyArrayIndexProcedure.writeMetadata(ObjectOutput).
protected  void writeMetadata(ObjectOutput out)
          Extended to write the overwrite flag.
 
Methods inherited from class com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure
getKey, getKeyCount, getKeys, getValue, getValues, readExternal, writeExternal
 
Methods inherited from class com.bigdata.btree.proc.AbstractIndexProcedure
getKeyBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextIndexWriteProc

public TextIndexWriteProc()
De-serialization constructor.


TextIndexWriteProc

protected TextIndexWriteProc(IRabaCoder keySer,
                             IRabaCoder valSer,
                             int fromIndex,
                             int toIndex,
                             byte[][] keys,
                             byte[][] vals,
                             boolean overwrite)
Method Detail

isReadOnly

public final boolean isReadOnly()
Description copied from interface: IIndexProcedure
Return true iff the procedure asserts that it will not write on the index. When true, the procedure may be run against a view of the index that is read-only or which allows concurrent processes to read on the same index object. When false the procedure will be run against a mutable view of the index (assuming that the procedure is executed in a context that has access to a mutable index view).

Specified by:
isReadOnly in interface IIndexProcedure

apply

public Object apply(IIndex ndx)
Description copied from interface: IIndexProcedure
Run the procedure.

Note: Unisolated procedures have "auto-commit" ACID properties for a local index only. In order for a distributed procedure to be ACID, the procedure MUST be executed within a fully isolated transaction.

Specified by:
apply in interface IIndexProcedure
Parameters:
ndx - The index.
Returns:
The #of pre-existing tuples that were updated as an Integer.

readMetadata

protected void readMetadata(ObjectInput in)
                     throws IOException,
                            ClassNotFoundException
Description copied from class: AbstractKeyArrayIndexProcedure
Reads metadata written by AbstractKeyArrayIndexProcedure.writeMetadata(ObjectOutput).

Overrides:
readMetadata in class AbstractKeyArrayIndexProcedure
Throws:
IOException
ClassNotFoundException

writeMetadata

protected void writeMetadata(ObjectOutput out)
                      throws IOException
Extended to write the overwrite flag.

Overrides:
writeMetadata in class AbstractKeyArrayIndexProcedure
Throws:
IOException


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.