001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.monitoring;
016    
017    import java.util.Map;
018    
019    /**
020     * @author Michael C. Han
021     * @author Brian Wing Shun Chan
022     */
023    public interface DataSample {
024    
025            public void capture(RequestStatus requestStatus);
026    
027            public Map<String, String> getAttributes();
028    
029            public long getCompanyId();
030    
031            public String getDescription();
032    
033            public long getDuration();
034    
035            public long getGroupId();
036    
037            public String getName();
038    
039            public String getNamespace();
040    
041            public RequestStatus getRequestStatus();
042    
043            public long getTimeout();
044    
045            public String getUser();
046    
047            public void prepare();
048    
049            public void setAttributes(Map<String, String> attributes);
050    
051            public void setCompanyId(long companyId);
052    
053            public void setDescription(String description);
054    
055            public void setGroupId(long groupId);
056    
057            public void setName(String name);
058    
059            public void setNamespace(String namespace);
060    
061            public void setTimeout(long timeout);
062    
063            public void setUser(String user);
064    
065    }