Advertisement
Guest User

Untitled

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