APISonar


scouter.lang.constants.ParamConstant.DATE

> scouter > lang > constants > ParamConstant > DATE
scouter APIs lang APIs constants APIs ParamConstant APIs DATE APIs

Example 1
public long retrieveVisitorByObj(int objHash, String date, final Server server) {
        MapPack param = new MapPack();
        param.put(ParamConstant.OBJ_HASH, objHash);
        param.put(ParamConstant.DATE, date);

        Value value;
        try (TcpProxy tcpProxy = TcpProxy.getTcpProxy(server)) {
            value = tcpProxy.getSingleValue(RequestCmd.VISITOR_LOADDATE, param);
        }

        return ((DecimalValue) value).value;
    }
Example 2
private List<Pack> retrieveXLogPacksByTxids(MultiXLogRequest xlogRequest) {
        MapPack param = new MapPack();
        param.put(ParamConstant.DATE, xlogRequest.getYyyymmdd());
        ListValue xlogLv = param.newList(XLOG_TXID);
        xlogRequest.getTxidList().forEach(xlogLv::add);

        List<Pack> results;
        try (TcpProxy tcpProxy = TcpProxy.getTcpProxy(xlogRequest.getServerId())) {
            results = tcpProxy.process(RequestCmd.XLOG_LOAD_BY_TXIDS, param);
        }
        return results;
    }
Example 3
private XLogPack retrieveByTxid(final SingleXLogRequest singleXLogRequest) {
        MapPack param = new MapPack();
        param.put(ParamConstant.DATE, singleXLogRequest.getYyyymmdd());
        param.put(XLOG_TXID, singleXLogRequest.getTxid());

        XLogPack pack;
        try (TcpProxy tcpProxy = TcpProxy.getTcpProxy(singleXLogRequest.getServerId())) {
            pack = (XLogPack) tcpProxy.getSingle(RequestCmd.XLOG_READ_BY_TXID, param);
        }

        return pack;
    }
Example 4
public XLogProfilePack retrieveProfilePack(final ProfileRequest profileRequest) {
        MapPack param = new MapPack();
        param.put(ParamConstant.DATE, profileRequest.getYyyymmdd());
        param.put(ParamConstant.XLOG_TXID, profileRequest.getTxid());
        param.put(ParamConstant.PROFILE_MAX, MAX_PROFILE_BLOCK);

        XLogProfilePack pack;
        try (TcpProxy tcpProxy = TcpProxy.getTcpProxy(profileRequest.getServerId())) {
            pack = (XLogProfilePack)
                    tcpProxy.getSingle(RequestCmd.TRANX_PROFILE, param);
        }

        return pack;
    }