Permalink
Browse files

Add ResponseTime annotation to Service

  • Loading branch information...
1 parent c431718 commit 9577669e520ef3cf78f2c25ba61c4082c51759b2 @jmarin jmarin committed Sep 29, 2012
@@ -43,12 +43,9 @@
@Qualifier("exceptionHandler")
private ExceptionHandler handler;
- // private static final String CENSUS_BY_COORDINATES =
- // "Census-findByCoordinates";
- // private static final String CENSUS_BY_FIPSCODE =
- // "Census-findGeographyByFips";
- // private static final String CENSUS_BY_GEOGRAPHY_NAME =
- // "Census-findGeographyByName";
+// private static final String CENSUS_BY_COORDINATES = "Census-findByCoordinates";
+// private static final String CENSUS_BY_FIPSCODE = "Census-findGeographyByFips";
+// private static final String CENSUS_BY_GEOGRAPHY_NAME = "Census-findGeographyByName";
@Override
@Path(value = "{geography}")
@@ -71,8 +68,7 @@ public Response findByCoordinates(@Context UriInfo uriInfo,
exception = ex;
// System.out.println(ex.getStackTrace());
}
- // APIStatsProfiler.captureStatistics(CENSUS_BY_COORDINATES,
- // apiResponse, uriInfo, true, exception);
+ //APIStatsProfiler.captureStatistics(CENSUS_BY_COORDINATES, apiResponse,uriInfo, true, exception);
Response response = RestFormatUtil
.format(format, callback, apiResponse);
return response;
@@ -14,6 +14,7 @@
import org.geo.spatialsearch.service.CensusService;
import org.geo.spatialsearch.util.GeometryUtil;
import org.geo.spatialsearch.util.Message;
+import org.geo.spatialsearch.util.ResponseTime;
import org.geo.spatialsearch.util.ValidationUtil;
import org.hibernate.Criteria;
import org.hibernate.spatial.criterion.SpatialRestrictions;
@@ -32,6 +33,7 @@
@Override
@Transactional(readOnly = true)
+ @ResponseTime
public CensusGeoBaseObject findById(CensusGeographyEnum geographyType,
Long id) {
CensusGeoBaseObject geoEntity = null;
@@ -45,6 +47,7 @@ public CensusGeoBaseObject findById(CensusGeographyEnum geographyType,
@Override
@Transactional(readOnly = true)
+ @ResponseTime
public CensusLookupResponse findByCoordinates(
CensusGeographyEnum geographyType, double longitude, double latitude) {
@@ -98,55 +101,55 @@ public CensusLookupResponse findByCoordinates(
private void findAllByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findTribalByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findStateSenateDistrictByPoint(
CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findStateHouseDistrictByPoint(
CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findPlaceByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findMSAByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findCongressionalDistrictByPoint(
CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findBlockByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findTractByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
private void findCountyByPoint(CensusLookupResponse apiResponse, Point point) {
// TODO Auto-generated method stub
-
+
}
@Transactional(readOnly = true)

0 comments on commit 9577669

Please sign in to comment.