Package com.oltpbenchmark.benchmarks.seats.util

Examples of com.oltpbenchmark.benchmarks.seats.util.FlightId.encode()


                    break;
                }
                // FLIGHT ID
                case (2): {
                    FlightId flight_id = (FlightId)this.current[1];
                    value = flight_id.encode();
                    if (profile.getReservationUpcomingOffset() == null &&
                        flight_id.isUpcoming(profile.getFlightStartDate(), profile.getFlightPastDays())) {
                        profile.setReservationUpcomingOffset(id);
                    }
                    break;
View Full Code Here


            start_date = new Timestamp(flightDate.getTime() - range);
            stop_date = new Timestamp(flightDate.getTime() + range);
           
            if (LOG.isDebugEnabled())
                LOG.debug(String.format("Using %s as look up in %s: %d / %s",
                                        flight_id, proc, flight_id.encode(), flightDate));
        }
       
        // If distance is greater than zero, then we will also get flights from nearby airports
        long distance = -1;
        if (rng.nextInt(100) < SEATSConstants.PROB_FIND_FLIGHTS_NEARBY_AIRPORT) {
View Full Code Here

        final FlightId search_flight = this.profile.getRandomFlightId();
        assert(search_flight != null);
        Long airport_depart_id = search_flight.getDepartAirportId();
       
        if (LOG.isTraceEnabled()) LOG.trace("Calling " + proc);
        Object[][] results = proc.run(conn, search_flight.encode());
        conn.commit();
       
        int rowCount = results.length;
        assert (rowCount <= SEATSConstants.FLIGHTS_NUM_SEATS) :
            String.format("Unexpected %d open seats returned for %s", rowCount, search_flight);
View Full Code Here

                                            customer_id,
                                            seatnum.intValue());
            seats.set(seatnum);
            tmp_reservations.add(r);
            if (LOG.isTraceEnabled())
                LOG.trace("QUEUED INSERT: " + search_flight + " / " + search_flight.encode() + " -> " + customer_id);
        } // WHILE
     
        if (tmp_reservations.isEmpty() == false) {
            Collections.shuffle(tmp_reservations);
            cache.addAll(tmp_reservations);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.