Atavism Version 2018.1AGIS API

atavism.msgsys
Class FilterUpdate

java.lang.Object
  extended by atavism.msgsys.FilterUpdate

public class FilterUpdate
extends java.lang.Object

Filter update instructions. A filter update contains a list of instructions to apply to a subscription filter. An instruction is an op-code (set, add, remove), a field identifier, and a value. The field identifiers are Filter implementation specific. The exact semantics of the op-codes are also defined by the Filter implementation. See the filter documentation for details.

Not all Filters support FilterUpdates.


Nested Class Summary
static class FilterUpdate.Instruction
          Filter update instruction.
 
Field Summary
protected  java.util.List<FilterUpdate.Instruction> instructions
           
static int OP_ADD
           
static int OP_REMOVE
           
static int OP_SET
           
 
Constructor Summary
FilterUpdate()
           
FilterUpdate(int capacity)
          Create filter update an pre-allocate space for instructions.
 
Method Summary
 void addFieldValue(int fieldId, java.lang.Object value)
          Add instruction to add a value to an existing field.
 java.util.List<FilterUpdate.Instruction> getInstructions()
          Get filter update instructions.
 void removeFieldValue(int fieldId, java.lang.Object value)
          Add instruction to remove a value from an existing field.
 void setField(int fieldId, java.lang.Object value)
          Add instruction to set a field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_SET

public static final int OP_SET
See Also:
Constant Field Values

OP_ADD

public static final int OP_ADD
See Also:
Constant Field Values

OP_REMOVE

public static final int OP_REMOVE
See Also:
Constant Field Values

instructions

protected java.util.List<FilterUpdate.Instruction> instructions
Constructor Detail

FilterUpdate

public FilterUpdate()

FilterUpdate

public FilterUpdate(int capacity)
Create filter update an pre-allocate space for instructions.

Parameters:
capacity - Number of instructions
Method Detail

setField

public void setField(int fieldId,
                     java.lang.Object value)
Add instruction to set a field.

Parameters:
fieldId - Field identifier.
value - Field value.

addFieldValue

public void addFieldValue(int fieldId,
                          java.lang.Object value)
Add instruction to add a value to an existing field.

Parameters:
fieldId - Field identifier.
value - Field value.

removeFieldValue

public void removeFieldValue(int fieldId,
                             java.lang.Object value)
Add instruction to remove a value from an existing field.

Parameters:
fieldId - Field identifier.
value - Field value.

getInstructions

public java.util.List<FilterUpdate.Instruction> getInstructions()
Get filter update instructions.



Copyright © 2018 Dragonsan Studios Sp. z o.o.