Package freenet.support

Examples of freenet.support.MutableBoolean


  }
 
  // Test sending it when the peer wants it to be sent. This is as a real message, *not* as a lossy message.
  public void testLoadStatsSendWhenPeerWants() throws BlockedTooLongException, InterruptedException {
    final Message loadMessage = DMT.createFNPVoid();
    final MutableBoolean gotMessage = new MutableBoolean();
    final SessionKey senderKey = new SessionKey(null, null, null, null, null, null, null, null, new NewPacketFormatKeyContext(0, 0), 1);
    NullBasePeerNode senderNode = new NullBasePeerNode() {
     
      boolean shouldSend = true;
     
View Full Code Here


  }
 
  // Test sending load message as a per-packet lossy message, including message decoding.
  public void testLoadStatsHighLevel() throws BlockedTooLongException, InterruptedException {
    final Message loadMessage = DMT.createFNPVoid();
    final MutableBoolean gotMessage = new MutableBoolean();
    NullBasePeerNode senderNode = new NullBasePeerNode() {
     
      @Override
      public MessageItem makeLoadStats(boolean realtime, boolean highPriority, boolean noRemember) {
        return new MessageItem(loadMessage, null, null, (short)0);
View Full Code Here

   * changed.
   */
  public void extractToCache(FreenetURI key, ARCHIVE_TYPE archiveType, COMPRESSOR_TYPE ctype, final Bucket data, ArchiveContext archiveContext, ArchiveStoreContext ctx, String element, ArchiveExtractCallback callback, ClientContext context) throws ArchiveFailureException, ArchiveRestartException {
    logMINOR = Logger.shouldLog(LogLevel.MINOR, this);

    MutableBoolean gotElement = element != null ? new MutableBoolean() : null;

    if(logMINOR) Logger.minor(this, "Extracting "+key);
    ctx.removeAllCachedItems(this); // flush cache anyway
    final long expectedSize = ctx.getLastSize();
    final long archiveSize = data.size();
View Full Code Here

   * not to call this function if you are not going to be able to send the message:
   * check in advance if possible. */
  public synchronized MessageItem grabQueuedMessageItem(int minPriority) {
    long now = System.currentTimeMillis();
   
    MutableBoolean addPeerLoadStatsRT = new MutableBoolean();
    MutableBoolean addPeerLoadStatsBulk = new MutableBoolean();
   
    addPeerLoadStatsRT.value = true;
    addPeerLoadStatsBulk.value = true;
   
    for(int i=0;i<DMT.PRIORITY_REALTIME_DATA;i++) {
View Full Code Here

TOP

Related Classes of freenet.support.MutableBoolean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.