class PeerScoring {

    public boolean hasGoodReputation() {
        try {
            rwlock.writeLock().lock();
            if (this.goodReputation) {
                return true;
            }

            if (this.punishmentTime > 0 && this.timeLostGoodReputation > 0
                    && this.punishmentTime + this.timeLostGoodReputation <= System.currentTimeMillis()) {
                this.endPunishment();
            }

            return this.goodReputation;
        } finally {
            rwlock.writeLock().unlock();
        }
    }

    public  PeerScoring();
    public  PeerScoring(boolean punishmentEnabled);

}