当前位置: 首页>>代码示例>>Java>>正文


Java PMD类代码示例

本文整理汇总了Java中com.paritytrading.parity.net.pmd.PMD的典型用法代码示例。如果您正苦于以下问题:Java PMD类的具体用法?Java PMD怎么用?Java PMD使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PMD类属于com.paritytrading.parity.net.pmd包,在下文中一共展示了PMD类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PMDSink

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
public PMDSink(File file) throws IOException {
    version       = new PMD.Version();
    seconds       = new PMD.Seconds();
    orderAdded    = new PMD.OrderAdded();
    orderExecuted = new PMD.OrderExecuted();
    orderCanceled = new PMD.OrderCanceled();
    orderDeleted  = new PMD.OrderDeleted();
    brokenTrade   = new PMD.BrokenTrade();

    currentSecond = 0;

    instrument = new Long2LongOpenHashMap();

    side = new Long2ByteOpenHashMap();

    buffer = ByteBuffer.allocate(BUFFER_CAPACITY);

    writer = BinaryFILEWriter.open(file);
}
 
开发者ID:jvirtanen,项目名称:nasdaq-tools,代码行数:20,代码来源:PMDSink.java

示例2: write

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
private void write(long timestampHigh, long timestampLow, PMD.Message message) throws IOException {
    long second = second(timestampHigh, timestampLow);

    if (currentSecond != second) {
        currentSecond = second;

        seconds.second = second;

        buffer.clear();
        seconds.put(buffer);
        buffer.flip();

        writer.write(buffer);
    }

    buffer.clear();
    message.put(buffer);
    buffer.flip();

    writer.write(buffer);
}
 
开发者ID:jvirtanen,项目名称:nasdaq-tools,代码行数:22,代码来源:PMDSink.java

示例3: send

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
private void send(PMD.Message message) {
    buffer.clear();
    message.put(buffer);
    buffer.flip();

    try {
        packet.put(buffer);

        transport.send(packet);

        packet.payload().flip();

        messages.put(packet);

        packet.clear();
    } catch (IOException e) {
        fatal(e);
    }
}
 
开发者ID:paritytrading,项目名称:parity,代码行数:20,代码来源:MarketData.java

示例4: MarketData

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
private MarketData(MoldUDP64Server transport, MoldUDP64RequestServer requestTransport) {
    this.version       = new PMD.Version();
    this.orderAdded    = new PMD.OrderAdded();
    this.orderExecuted = new PMD.OrderExecuted();
    this.orderCanceled = new PMD.OrderCanceled();

    this.transport = transport;

    this.requestTransport = requestTransport;

    this.messages = new MoldUDP64DefaultMessageStore();

    this.packet = new MoldUDP64DownstreamPacket();
    this.buffer = ByteBuffer.allocateDirect(1024);
}
 
开发者ID:paritytrading,项目名称:parity,代码行数:16,代码来源:MarketData.java

示例5: version

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void version(PMD.Version message) {
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:4,代码来源:MarketDataProcessor.java

示例6: seconds

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void seconds(PMD.Seconds message) {
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:4,代码来源:MarketDataProcessor.java

示例7: orderAdded

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderAdded(PMD.OrderAdded message) {
    market.add(message.instrument, message.orderNumber, side(message.side),
            message.price, message.quantity);
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:6,代码来源:MarketDataProcessor.java

示例8: orderExecuted

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderExecuted(PMD.OrderExecuted message) {
    market.execute(message.orderNumber, message.quantity);
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:5,代码来源:MarketDataProcessor.java

示例9: orderCanceled

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderCanceled(PMD.OrderCanceled message) {
    market.cancel(message.orderNumber, message.canceledQuantity);
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:5,代码来源:MarketDataProcessor.java

示例10: orderDeleted

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderDeleted(PMD.OrderDeleted message) {
    market.delete(message.orderNumber);
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:5,代码来源:MarketDataProcessor.java

示例11: brokenTrade

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void brokenTrade(PMD.BrokenTrade message) {
}
 
开发者ID:paritytrading,项目名称:parity-extras,代码行数:4,代码来源:MarketDataProcessor.java

示例12: side

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
private byte side(byte buySellIndicator) {
    return buySellIndicator == ITCH50.BUY ? PMD.BUY : PMD.SELL;
}
 
开发者ID:jvirtanen,项目名称:nasdaq-tools,代码行数:4,代码来源:PMDSink.java

示例13: version

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void version(PMD.Version message) {
    if (message.version != PMD.VERSION)
        error("Unsupported protocol version");
}
 
开发者ID:paritytrading,项目名称:parity,代码行数:6,代码来源:MarketDataProcessor.java

示例14: orderAdded

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderAdded(PMD.OrderAdded message) {
    listener.timestamp(message.timestamp);

    market.add(message.instrument, message.orderNumber, side(message.side), message.price, message.quantity);
}
 
开发者ID:paritytrading,项目名称:parity,代码行数:7,代码来源:MarketDataProcessor.java

示例15: orderExecuted

import com.paritytrading.parity.net.pmd.PMD; //导入依赖的package包/类
@Override
public void orderExecuted(PMD.OrderExecuted message) {
    listener.timestamp(message.timestamp);

    market.execute(message.orderNumber, message.quantity);
}
 
开发者ID:paritytrading,项目名称:parity,代码行数:7,代码来源:MarketDataProcessor.java


注:本文中的com.paritytrading.parity.net.pmd.PMD类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。