Example usage for org.apache.commons.collections4.map ReferenceMap ReferenceMap

List of usage examples for org.apache.commons.collections4.map ReferenceMap ReferenceMap

Introduction

In this page you can find the example usage for org.apache.commons.collections4.map ReferenceMap ReferenceMap.

Prototype

public ReferenceMap(final ReferenceStrength keyType, final ReferenceStrength valueType,
        final boolean purgeValues) 

Source Link

Document

Constructs a new ReferenceMap that will use the specified types of references.

Usage

From source file:org.jspresso.framework.model.entity.basic.BasicEntityRegistry.java

@SuppressWarnings("unchecked")
private Map<Serializable, IEntity> createContractStoreMap() {
    return new ReferenceMap(AbstractReferenceMap.ReferenceStrength.HARD,
            AbstractReferenceMap.ReferenceStrength.WEAK, true);
}

From source file:org.jspresso.framework.util.remote.registry.BasicRemotePeerRegistry.java

/**
 * Constructs a new {@code BasicRemotePeerRegistry} instance.
 *//*w  w  w . j av a2  s  . c o  m*/
@SuppressWarnings("unchecked")
public BasicRemotePeerRegistry() {
    backingStore = new RemotePeerReferenceMap(AbstractReferenceMap.ReferenceStrength.WEAK,
            AbstractReferenceMap.ReferenceStrength.WEAK, true);
    automationBackingStore = new ReferenceMap(AbstractReferenceMap.ReferenceStrength.WEAK,
            AbstractReferenceMap.ReferenceStrength.WEAK, true);
    automationIndices = new HashMap<>();
    setAutomationEnabled(false);
}

From source file:org.jspresso.framework.util.resources.server.ResourceManager.java

@SuppressWarnings("unchecked")
private ResourceManager() {
    // resources = new HashMap<String, IResource>();
    resources = new ReferenceMap(AbstractReferenceMap.ReferenceStrength.SOFT,
            AbstractReferenceMap.ReferenceStrength.SOFT, true);
    random = new SecureRandom();
}