use of org.apache.geode.internal.cache.execute.data.OrderId in project geode by apache.
the class FixedPartitioningTestBase method putOrderPartitionedRegion_Persistence1.
public static void putOrderPartitionedRegion_Persistence1(String partitionedRegionName) {
assertNotNull(cache);
Region partitionedregion = cache.getRegion(Region.SEPARATOR + partitionedRegionName);
assertNotNull(partitionedregion);
for (int i = 1; i <= 20; i++) {
if (i % 2 == 0) {
CustId custid = new CustId(i);
for (int j = 1; j <= 10; j++) {
int oid = (i * 10) + j;
OrderId orderId = new OrderId(oid, custid);
Order order = new Order("OREDR" + oid);
try {
partitionedregion.put(orderId, order);
} catch (Exception e) {
org.apache.geode.test.dunit.Assert.fail("putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ", e);
}
LogWriterUtils.getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
}
}
}
}
use of org.apache.geode.internal.cache.execute.data.OrderId in project geode by apache.
the class FixedPartitioningTestBase method putShipmentPartitionedRegion.
public static void putShipmentPartitionedRegion(String partitionedRegionName) {
assertNotNull(cache);
Region partitionedregion = cache.getRegion(Region.SEPARATOR + partitionedRegionName);
assertNotNull(partitionedregion);
for (int i = 1; i <= 40; i++) {
CustId custid = new CustId(i);
for (int j = 1; j <= 10; j++) {
int oid = (i * 10) + j;
OrderId orderId = new OrderId(oid, custid);
for (int k = 1; k <= 10; k++) {
int sid = (oid * 10) + k;
ShipmentId shipmentId = new ShipmentId(sid, orderId);
Shipment shipment = new Shipment("Shipment" + sid);
try {
partitionedregion.put(shipmentId, shipment);
} catch (Exception e) {
org.apache.geode.test.dunit.Assert.fail("putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ", e);
}
LogWriterUtils.getLogWriter().info("Shipment :- { " + shipmentId + " : " + shipment + " }");
}
}
}
}
use of org.apache.geode.internal.cache.execute.data.OrderId in project geode by apache.
the class FixedPartitioningTestBase method putOrderPartitionedRegion_Persistence.
public static void putOrderPartitionedRegion_Persistence(String partitionedRegionName) {
assertNotNull(cache);
Region partitionedregion = cache.getRegion(Region.SEPARATOR + partitionedRegionName);
assertNotNull(partitionedregion);
for (int i = 1; i <= 20; i++) {
CustId custid = new CustId(i);
for (int j = 1; j <= 10; j++) {
int oid = (i * 10) + j;
OrderId orderId = new OrderId(oid, custid);
Order order = new Order("OREDR" + oid);
try {
partitionedregion.put(orderId, order);
} catch (Exception e) {
org.apache.geode.test.dunit.Assert.fail("putOrderPartitionedRegion : failed while doing put operation in OrderPartitionedRegion ", e);
}
LogWriterUtils.getLogWriter().info("Order :- { " + orderId + " : " + order + " }");
}
}
}
use of org.apache.geode.internal.cache.execute.data.OrderId in project geode by apache.
the class FixedPartitioningTestBase method putShipmentPartitionedRegion_Persistence1.
public static void putShipmentPartitionedRegion_Persistence1(String partitionedRegionName) {
assertNotNull(cache);
Region partitionedregion = cache.getRegion(Region.SEPARATOR + partitionedRegionName);
assertNotNull(partitionedregion);
for (int i = 1; i <= 20; i++) {
if (i % 2 == 0) {
CustId custid = new CustId(i);
for (int j = 1; j <= 10; j++) {
int oid = (i * 10) + j;
OrderId orderId = new OrderId(oid, custid);
for (int k = 1; k <= 10; k++) {
int sid = (oid * 10) + k;
ShipmentId shipmentId = new ShipmentId(sid, orderId);
Shipment shipment = new Shipment("Shipment" + sid);
try {
partitionedregion.put(shipmentId, shipment);
} catch (Exception e) {
org.apache.geode.test.dunit.Assert.fail("putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ", e);
}
LogWriterUtils.getLogWriter().info("Shipment :- { " + shipmentId + " : " + shipment + " }");
}
}
}
}
}
use of org.apache.geode.internal.cache.execute.data.OrderId in project geode by apache.
the class WANTestBase method putShipmentPartitionedRegion.
public static Map putShipmentPartitionedRegion(int numPuts) {
assertNotNull(cache);
assertNotNull(shipmentRegion);
Map shipmentKeyValue = new HashMap();
for (int i = 1; i <= numPuts; i++) {
CustId custid = new CustId(i);
int oid = i + 1;
OrderId orderId = new OrderId(oid, custid);
int sid = oid + 1;
ShipmentId shipmentId = new ShipmentId(sid, orderId);
Shipment shipment = new Shipment("Shipment" + sid);
try {
shipmentRegion.put(shipmentId, shipment);
assertTrue(shipmentRegion.containsKey(shipmentId));
assertEquals(shipment, shipmentRegion.get(shipmentId));
shipmentKeyValue.put(shipmentId, shipment);
} catch (Exception e) {
org.apache.geode.test.dunit.Assert.fail("putShipmentPartitionedRegion : failed while doing put operation in ShipmentPartitionedRegion ", e);
}
LogWriterUtils.getLogWriter().info("Shipment :- { " + shipmentId + " : " + shipment + " }");
}
return shipmentKeyValue;
}
Aggregations