Search in sources :

Example 1 with TestTopologyAwareAddress

use of org.infinispan.distribution.TestTopologyAwareAddress in project infinispan by infinispan.

the class TopologyAwareOwnershipStatistics method setUp.

@BeforeMethod()
public void setUp() {
    chf = createConsistentHashFactory();
    chMembers = new ArrayList<>(ADDRESS_COUNT);
    capacityFactors = null;
    testAddresses = new TestTopologyAwareAddress[ADDRESS_COUNT];
    for (int i = 0; i < ADDRESS_COUNT; i++) {
        testAddresses[i] = new TestTopologyAwareAddress(i * 100);
        testAddresses[i].setName(Character.toString((char) ('A' + i)));
    }
    keyPartitioner = new HashFunctionPartitioner(numSegments);
}
Also used : TestTopologyAwareAddress(org.infinispan.distribution.TestTopologyAwareAddress) HashFunctionPartitioner(org.infinispan.distribution.ch.impl.HashFunctionPartitioner) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

TestTopologyAwareAddress (org.infinispan.distribution.TestTopologyAwareAddress)1 HashFunctionPartitioner (org.infinispan.distribution.ch.impl.HashFunctionPartitioner)1 BeforeMethod (org.testng.annotations.BeforeMethod)1