protected class BufferedPushAPI.TOperationBuffer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
BufferedPushAPI.TOperationBuffer.NeedFlushException
Exception throws when a flush operation is required.
|
Modifier and Type | Field and Description |
---|---|
protected BufferedPushAPI.TBuffer |
add
addDocument buffer
|
protected BufferedPushAPI.TBuffer |
del
deleteDocument buffer
|
protected static int |
FIRST_FLUSH |
protected int[] |
flush
Flags describing which operations has to be flushed according to the
NEED_FLUSH_* flags.
|
static int |
NEED_FLUSH_ADD
A flush of the add buffer is required.
|
static int |
NEED_FLUSH_ALL
All flush flags are set.
|
static int |
NEED_FLUSH_DEL
A flush of the del is required.
|
static int |
NEED_FLUSH_NONE
No flush is required.
|
static int |
NEED_FLUSH_UPDATE
A flush of the update buffer is required.
|
static int |
NEED_FLUSH_UPDATE_METAS
A flush of the add update metas is required.
|
protected static int |
SECOND_FLUSH |
protected BufferedPushAPI.TBuffer |
update
updateDocument buffer
|
protected BufferedPushAPI.TBuffer |
updateMetas
updateDocumentMetas buffer
|
Constructor and Description |
---|
TOperationBuffer(int size,
long maxBytes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addDocument(PushAPI parent,
Document document)
Push an add document operation and, if flush operation buffers that
need to be flushed.
|
void |
deleteDocument(PushAPI parent,
java.lang.String uri)
Push a delete operation and, if flush operation buffers that need to
be flushed.
|
protected void |
executeFlushOperation(PushAPI parent)
Execute flush operations currently required.
|
void |
flush(PushAPI parent)
Flush all operations.
|
protected int |
getOperationsToFlush(java.lang.String uri,
int exclude)
Given an URI, return the mask describing all operations buffers which
already has this URL recorded.
|
protected void |
pushAddDocument(Document document)
Push an add document operation
|
protected void |
pushAny(int operation,
java.lang.String uri,
boolean full)
Push an add document operation
|
protected void |
pushDeleteDocument(java.lang.String uri)
Push a delete document operation
|
protected void |
pushUpdateDocument(Document document,
java.lang.String[] fields)
Push an update document operation
|
protected void |
pushUpdateDocumentMetas(java.lang.String uri,
java.lang.String stamp,
MetaContainer metaContainer)
Push an update metas document operation
|
protected void |
throwIfFlushNeeded()
Throws NeedFlushException if a flush is needed
|
void |
updateDocument(PushAPI parent,
Document doc,
java.lang.String[] fields)
Push an update document operation and, if flush operation buffers
that need to be flushed.
|
void |
updateDocumentMetas(PushAPI parent,
java.lang.String uri,
java.lang.String stamp,
MetaContainer metaContainer)
Push an add update metas operation and, if flush operation buffers
that need to be flushed.
|
protected int[] flush
public static final int NEED_FLUSH_NONE
public static final int NEED_FLUSH_ADD
public static final int NEED_FLUSH_DEL
public static final int NEED_FLUSH_UPDATE
public static final int NEED_FLUSH_UPDATE_METAS
public static final int NEED_FLUSH_ALL
protected final BufferedPushAPI.TBuffer add
protected final BufferedPushAPI.TBuffer del
protected final BufferedPushAPI.TBuffer update
protected final BufferedPushAPI.TBuffer updateMetas
protected static final int FIRST_FLUSH
protected static final int SECOND_FLUSH
protected int getOperationsToFlush(java.lang.String uri, int exclude)
uri
- the URI to lookup in all operation buffersmask
- of operation buffers to be excluded from the lookupprotected void throwIfFlushNeeded() throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void pushAny(int operation, java.lang.String uri, boolean full) throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void pushAddDocument(Document document) throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void pushUpdateDocument(Document document, java.lang.String[] fields) throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void pushUpdateDocumentMetas(java.lang.String uri, java.lang.String stamp, MetaContainer metaContainer) throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void pushDeleteDocument(java.lang.String uri) throws BufferedPushAPI.TOperationBuffer.NeedFlushException
protected void executeFlushOperation(PushAPI parent) throws PushAPIException
PushAPIException
public void addDocument(PushAPI parent, Document document) throws PushAPIException
PushAPIException
public void updateDocument(PushAPI parent, Document doc, java.lang.String[] fields) throws PushAPIException
PushAPIException
public void updateDocumentMetas(PushAPI parent, java.lang.String uri, java.lang.String stamp, MetaContainer metaContainer) throws PushAPIException
PushAPIException
public void deleteDocument(PushAPI parent, java.lang.String uri) throws PushAPIException
PushAPIException
public void flush(PushAPI parent) throws PushAPIException
PushAPIException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.