public class AtomicBlockWriteProc extends Object implements ISimpleIndexProcedure<Object>, Externalizable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG
True iff the
log level is DEBUG or less. |
static boolean |
INFO
True iff the
log level is INFO or less. |
protected static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
AtomicBlockWriteProc(BigdataFileSystem repo,
String id,
int version,
long block,
byte[] b,
int off,
int len) |
Modifier and Type | Method and Description |
---|---|
Object |
apply(IIndex ndx)
This procedure runs on the unisolated index.
|
boolean |
isReadOnly()
Return
true iff the procedure asserts that it will not
write on the index. |
void |
readExternal(ObjectInput in) |
void |
writeExternal(ObjectOutput out) |
protected static transient org.apache.log4j.Logger log
public static final transient boolean INFO
log
level is INFO or less.public static final transient boolean DEBUG
log
level is DEBUG or less.public AtomicBlockWriteProc(BigdataFileSystem repo, String id, int version, long block, byte[] b, int off, int len)
id
- The file identifier.version
- The file version.block
- The block identifier.b
- The buffer containing the data to be written.off
- The offset in the buffer of the first byte to be written.len
- The #of bytes to be written.public final boolean isReadOnly()
IReadOnly
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).isReadOnly
in interface IReadOnly
public Object apply(IIndex ndx)
Journal
and the index is added/updated
using the given file, version and block and the address of the
block's data on the Journal
.apply
in interface IIndexProcedure<Object>
ndx
- The index.Boolean
whose value is true
iff the
block was overwritten.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.