What is the difference between  below two methods. What is the correct way
of doing $subject

 private int memberCount;
//This map will keep number of currently spawned instance count against
partitionId
    private Map<String, Integer> partitionCountMap;

public int getMemberCount() {
        return memberCount;
    }


public int getMemberCount(String partitionId){
        if(partitionCountMap.containsKey(partitionId)) {
            return partitionCountMap.get(partitionId);
        }
        return 0;
    }


-- 
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Reply via email to