Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. package com.seamfix.topriddy.valthemes;
  2.  
  3. /**
  4.  *
  5.  * @author temitopefaro
  6.  */
  7. public class Statistics {
  8.     private long pageHits;
  9.     private long bbDownloadHits;
  10.     private long pcDownloadHits;
  11.  
  12.     public Statistics(){
  13.  
  14.     }
  15.    
  16.     public long getBbDownloadHits() {
  17.         return bbDownloadHits;
  18.     }
  19.  
  20.     public void setBbDownloadHits(long bbDownloadHits) {
  21.         this.bbDownloadHits = bbDownloadHits;
  22.     }
  23.  
  24.     public long getPageHits() {
  25.         return pageHits;
  26.     }
  27.  
  28.     public void setPageHits(long pageHits) {
  29.         this.pageHits = pageHits;
  30.     }
  31.  
  32.     public long getPcDownloadHits() {
  33.         return pcDownloadHits;
  34.     }
  35.  
  36.     public void setPcDownloadHits(long pcDownloadHits) {
  37.         this.pcDownloadHits = pcDownloadHits;
  38.     }
  39.  
  40.     public synchronized void incrementPageHits(){
  41.         pageHits++;
  42.     }
  43.     public synchronized void incrementBBDownloadHits(){
  44.         bbDownloadHits++;
  45.     }
  46.     public synchronized void incrementPCDownloadHits(){
  47.         pcDownloadHits++;
  48.     }
  49.  
  50.     public synchronized long getTotalDownloadHits(){
  51.         return pcDownloadHits + bbDownloadHits;
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement