Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
Copyright (C) SYSTAP, LLC DBA Blazegraph 2006-2016. All rights reserved.
Contact:
SYSTAP, LLC DBA Blazegraph
2501 Calvert ST NW #106
Washington, DC 20008
[email protected]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Created on Jan 25, 2008
*/
package com.bigdata.rdf.spo;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.apache.log4j.Logger;
import com.bigdata.btree.IIndex;
import com.bigdata.btree.proc.AbstractKeyArrayIndexProcedure;
import com.bigdata.btree.proc.AbstractKeyArrayIndexProcedureConstructor;
import com.bigdata.btree.proc.IParallelizableIndexProcedure;
import com.bigdata.btree.proc.IResultHandler;
import com.bigdata.btree.proc.LongAggregator;
import com.bigdata.btree.raba.IRaba;
import com.bigdata.btree.raba.codec.IRabaCoder;
import com.bigdata.rdf.model.StatementEnum;
import com.bigdata.relation.IMutableRelationIndexWriteProcedure;
import com.bigdata.util.BytesUtil;
/**
* Procedure for batch insert on a single statement index (or index partition).
*
* The key for each statement encodes the {s:p:o} of the statement in the order
* that is appropriate for the index (SPO, POS, OSP, etc). The key is written
* unchanged on the index.
*
* The value for each statement is a byte that encodes the {@link StatementEnum}
* and also encodes whether or not the "override" flag is set using - see
* {@link StatementEnum#MASK_OVERRIDE} - followed by 8 bytes representing the
* statement identifier IFF statement identifiers are enabled AND the
* {@link StatementEnum} is {@link StatementEnum#Explicit}. The value requires
* interpretation to determine the byte[] that will be written as the value on
* the index - see the code for more details.
*
* Note: This needs to be a custom batch operation using a conditional insert so
* that we do not write on the index when the data would not be changed and to
* handle the overflow flag and the optional statement identifier correctly.
*
* @author Bryan Thompson
*/
public class SPOIndexWriteProc extends AbstractKeyArrayIndexProcedure