Package org.springframework.amqp.core
Class ConsistentHashExchange
java.lang.Object
org.springframework.amqp.core.AbstractDeclarable
org.springframework.amqp.core.AbstractExchange
org.springframework.amqp.core.ConsistentHashExchange
- All Implemented Interfaces:
Declarable
,Exchange
An
AbstractExchange
extension for Consistent Hash exchange type.- Since:
- 3.2
- Author:
- Artem Bilan
- See Also:
-
Constructor Summary
ConstructorDescriptionConsistentHashExchange
(String name) Construct a new durable, non-auto-delete Exchange with the provided name.ConsistentHashExchange
(String name, boolean durable, boolean autoDelete) Construct a new Exchange, given a name, durability flag, auto-delete flag.ConsistentHashExchange
(String name, boolean durable, boolean autoDelete, Map<String, Object> arguments) Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
The type of the exchange.void
setHashHeader
(String headerName) Specify a header name from the message to hash.void
setHashProperty
(String propertyName) Specify a property name from the message to hash.Methods inherited from class org.springframework.amqp.core.AbstractExchange
getName, isAutoDelete, isDelayed, isDurable, isInternal, setDelayed, setInternal, toString
Methods inherited from class org.springframework.amqp.core.AbstractDeclarable
addArgument, getArguments, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, setIgnoreDeclarationExceptions, setShouldDeclare, shouldDeclare
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.amqp.core.Declarable
addArgument, getDeclaringAdmins, isIgnoreDeclarationExceptions, removeArgument, setAdminsThatShouldDeclare, shouldDeclare
Methods inherited from interface org.springframework.amqp.core.Exchange
getArguments
-
Constructor Details
-
ConsistentHashExchange
Construct a new durable, non-auto-delete Exchange with the provided name.- Parameters:
name
- the name of the exchange.
-
ConsistentHashExchange
Construct a new Exchange, given a name, durability flag, auto-delete flag.- Parameters:
name
- the name of the exchange.durable
- true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete
- true if the server should delete the exchange when it is no longer in use
-
ConsistentHashExchange
public ConsistentHashExchange(String name, boolean durable, boolean autoDelete, Map<String, Object> arguments) Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments.- Parameters:
name
- the name of the exchange.durable
- true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete
- true if the server should delete the exchange when it is no longer in usearguments
- the arguments used to declare the exchange
-
-
Method Details
-
setHashHeader
Specify a header name from the message to hash.- Parameters:
headerName
- the header name for hashing.
-
setHashProperty
Specify a property name from the message to hash.- Parameters:
propertyName
- the property name for hashing.
-
getType
Description copied from interface:Exchange
The type of the exchange. SeeExchangeTypes
for some well-known examples.- Specified by:
getType
in interfaceExchange
- Specified by:
getType
in classAbstractExchange
- Returns:
- the type of the exchange.
-