Class InfinispanBeanGroupEntry<I,T,C>
- java.lang.Object
-
- org.wildfly.clustering.ejb.infinispan.group.InfinispanBeanGroupEntry<I,T,C>
-
- Type Parameters:
I- the bean identifier typeT- the bean type
- All Implemented Interfaces:
Function<I,AtomicInteger>,BeanGroupEntry<I,T,C>
public class InfinispanBeanGroupEntry<I,T,C> extends Object implements BeanGroupEntry<I,T,C>, Function<I,AtomicInteger>
The cache entry of a bean group.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description InfinispanBeanGroupEntry(org.wildfly.clustering.marshalling.spi.MarshalledValue<Map<I,T>,C> beans)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AtomicIntegerapply(I key)intdecrementUsage(I id)Decrements the usage count of the specified bean.org.wildfly.clustering.marshalling.spi.MarshalledValue<Map<I,T>,C>getBeans()Returns the beans in this group indexed via identifier.intincrementUsage(I id)Increments the usage count of the specified bean.inttotalUsage()The total usage counts for all beans in this group/
-
-
-
Method Detail
-
getBeans
public org.wildfly.clustering.marshalling.spi.MarshalledValue<Map<I,T>,C> getBeans()
Description copied from interface:BeanGroupEntryReturns the beans in this group indexed via identifier.- Specified by:
getBeansin interfaceBeanGroupEntry<I,T,C>- Returns:
- a marshalled value
-
incrementUsage
public int incrementUsage(I id)
Description copied from interface:BeanGroupEntryIncrements the usage count of the specified bean.- Specified by:
incrementUsagein interfaceBeanGroupEntry<I,T,C>- Parameters:
id- a bean identifier- Returns:
- the previous usage count
-
decrementUsage
public int decrementUsage(I id)
Description copied from interface:BeanGroupEntryDecrements the usage count of the specified bean.- Specified by:
decrementUsagein interfaceBeanGroupEntry<I,T,C>- Parameters:
id- a bean identifier- Returns:
- the current usage count
-
totalUsage
public int totalUsage()
Description copied from interface:BeanGroupEntryThe total usage counts for all beans in this group/- Specified by:
totalUsagein interfaceBeanGroupEntry<I,T,C>- Returns:
- the total usage count
-
-