Some generalizations of Calabi compactness theorem