protected static class BufferedPushAPI.TBuffer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
BufferedPushAPI.TBuffer.Arrays<T>
Replaces java.lang.Arrays.copyOf() (java 1.5)
|
Modifier and Type | Field and Description |
---|---|
protected long |
currentBytes |
protected int |
currentIndex |
protected Document[] |
documents |
protected java.lang.String[][] |
fields |
protected long |
maxBytes |
protected MetaContainer[] |
metaContainers |
protected int |
size |
protected java.lang.String[] |
stamps |
protected java.lang.String[] |
uris |
protected java.util.HashSet<java.lang.String> |
urisSeen |
Constructor and Description |
---|
TBuffer(int size,
long maxBytes)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
clear()
Clear the buffer content.
|
protected static long |
documentSize(Document document)
Get a Document estimated size.
|
void |
executeAddDocument(PushAPI parent)
Flush all add commands to the upstream Push API
|
void |
executeDeleteDocument(PushAPI parent)
Flush all delete commands to the upstream Push API
|
void |
executeUpdateDocument(PushAPI parent)
Flush all update commands to the upstream Push API
|
void |
executeUpdateDocumentMetas(PushAPI parent)
Deprecated.
|
int |
getCount()
Return the number of cached operations
|
protected void |
init()
Initialize internal fields.
|
boolean |
isEmpty()
Is the buffer empty ?
|
boolean |
isFull()
Is the buffer now full ? Calling this method is mandatory after a
push*() function has been called
|
boolean |
pushAddDocument(Document document)
Push an add command
|
protected boolean |
pushCommand()
Take in account new command.
|
boolean |
pushDeleteDocument(java.lang.String uri)
Push a delete command
|
boolean |
pushUpdateDocument(Document doc,
java.lang.String[] fields)
Push an update command
|
boolean |
pushUpdateDocumentMetas(java.lang.String uri,
java.lang.String stamp,
MetaContainer metaContainer)
Push an update metas command
|
protected void |
recordUri(java.lang.String uri)
Record an URI as "seen".
|
boolean |
seenUri(java.lang.String uri)
Is the given URI in the buffer ?
|
protected Document[] documents
protected java.lang.String[] uris
protected java.lang.String[][] fields
protected java.lang.String[] stamps
protected MetaContainer[] metaContainers
protected final int size
protected final long maxBytes
protected int currentIndex
protected long currentBytes
protected java.util.HashSet<java.lang.String> urisSeen
protected void init()
protected void clear()
protected void recordUri(java.lang.String uri)
public boolean seenUri(java.lang.String uri)
public boolean isEmpty()
public boolean isFull()
public int getCount()
protected static long documentSize(Document document)
protected boolean pushCommand()
public boolean pushAddDocument(Document document)
public boolean pushUpdateDocument(Document doc, java.lang.String[] fields)
public boolean pushUpdateDocumentMetas(java.lang.String uri, java.lang.String stamp, MetaContainer metaContainer)
public boolean pushDeleteDocument(java.lang.String uri)
public void executeAddDocument(PushAPI parent) throws PushAPIException
PushAPIException
public void executeUpdateDocument(PushAPI parent) throws PushAPIException
PushAPIException
@Deprecated public void executeUpdateDocumentMetas(PushAPI parent) throws PushAPIException
PushAPIException
public void executeDeleteDocument(PushAPI parent) throws PushAPIException
PushAPIException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.