public class

Criteria

extends Object
java.lang.Object
   ↳ org.apache.helix.Criteria

Class Overview

Describes various properties that operations involving Message delivery will follow.

Summary

Nested Classes
enum Criteria.DataSource  
Public Constructors
Criteria()
Public Methods
Criteria.DataSource getDataSource()
Get the current source of truth
String getInstanceName()
Get the name of the destination instance, available only for PARTICIPANT
String getPartition()
Get the destination partition name
String getPartitionState()
Get the state of a resource partition
InstanceType getRecipientInstanceType()
Determine the type of the recipient
String getResource()
Get the destination resource name
boolean isSelfExcluded()
Determine if the message is excluded from being sent to the sender
boolean isSessionSpecific()
Determine if this message should be processed only if an instance was up at send time
void setDataSource(Criteria.DataSource source)
Set the current source of truth
void setInstanceName(String instanceName)
Set the name of the destination instance (PARTICIPANT only)
void setPartition(String partitionName)
Set the destination partition name
void setPartitionState(String partitionState)
Set the state of the resource partition
void setRecipientInstanceType(InstanceType recipientInstanceType)
Set the type of the recipient
void setResource(String resourceName)
Set the destination resource name
void setSelfExcluded(boolean selfExcluded)
Indicate whether or not the sender will be excluded as a message recipient
void setSessionSpecific(boolean sessionSpecific)
Indicate whether or not a message should be restricted to a session
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Criteria ()

Public Methods

public Criteria.DataSource getDataSource ()

Get the current source of truth

Returns
  • either the ideal state or the external view

public String getInstanceName ()

Get the name of the destination instance, available only for PARTICIPANT

Returns
  • the instance name

public String getPartition ()

Get the destination partition name

Returns
  • destination partition name

public String getPartitionState ()

Get the state of a resource partition

Returns
  • the state of the resource partition

public InstanceType getRecipientInstanceType ()

Determine the type of the recipient

Returns
  • InstanceType (e.g. PARTICIPANT, CONTROLLER, SPECTATOR)

public String getResource ()

Get the destination resource name

Returns
  • destination resource name

public boolean isSelfExcluded ()

Determine if the message is excluded from being sent to the sender

Returns
  • true if the self-sent message is excluded, false otherwise

public boolean isSessionSpecific ()

Determine if this message should be processed only if an instance was up at send time

Returns
  • true if the message will be processed by current live nodes, false otherwise

public void setDataSource (Criteria.DataSource source)

Set the current source of truth

Parameters
source ideal state or external view

public void setInstanceName (String instanceName)

Set the name of the destination instance (PARTICIPANT only)

Parameters
instanceName the instance name or * for all instances

public void setPartition (String partitionName)

Set the destination partition name

Parameters
partitionName the partition name, or * for all partitions of a resource

public void setPartitionState (String partitionState)

Set the state of the resource partition

Parameters
partitionState the state of the resource partition

public void setRecipientInstanceType (InstanceType recipientInstanceType)

Set the type of the recipient

Parameters
recipientInstanceType InstanceType (e.g. PARTICIPANT, CONTROLLER, SPECTATOR)

public void setResource (String resourceName)

Set the destination resource name

Parameters
resourceName the resource name or * for all resources

public void setSelfExcluded (boolean selfExcluded)

Indicate whether or not the sender will be excluded as a message recipient

Parameters
selfExcluded true if the sender should be excluded, false otherwise

public void setSessionSpecific (boolean sessionSpecific)

Indicate whether or not a message should be restricted to a session

Parameters
sessionSpecific true if the message can only be processed by live nodes at send time, false otherwise

public String toString ()