Logo
Distributed Genetic Programming Framework
print print

File org.dgpf.search.control.protocol.ProtCircularBuffer.java

Here you can find all the information about the file org.dgpf.search.control.protocol.ProtCircularBuffer.java. You may explore it here or download it onto your local disk.
/*
 * Copyright (c) 2006 Mirko Dietrich
 * 
 * E-Mail           : mirkodietrich@hrz.uni-kassel.de
 * Creation Date    : Sep 3, 2006 5:04:30 PM
 * Original Filename: org.dgpf.search.control.protocol.ProtCircularBuffer.java
 * Version          : 1.0
 * Last modification: Sep 3, 2006
 * Last modified by : Mirko Dietrich
 * 
 * License          : GNU LESSER GENERAL PUBLIC LICENSE
 *                    Version 2.1, February 1999
 *                    You should have received a copy of this license along
 *                    with this library; if not, write to the Free Software
 *                    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 *                    MA 02111-1307, USA or download the license under
 *                    http://www.gnu.org/copyleft/lesser.html.
 *                    
 * Warranty         : This software is provided "as is" without any
 *                    warranty; without even the implied warranty of
 *                    merchantability or fitness for a particular purpose.
 *                    See the Gnu Lesser General Public License for more
 *                    details.
 */


package org.dgpf.search.control.protocol;

import org.sfc.collections.CircularBuffer;

/**
 * This class represents a circular buffer that might be used for temporary
 * data storage. In contrast to the <code>CircularBuffer</code> class it
 * yields messages in case the buffer runs full.
 * 
 * @param <Type>
 *          The data-type of the items stored.
 * @author Mirko Dietrich
 */

public class ProtCircularBuffer<Type> extends CircularBuffer
  {

  /**
   * Default constructor.
   * 
   * @param p_class
   *          The class of the items to be stored.
   * @param p_size
   *          The size of the buffer to allocate.
   */

  @SuppressWarnings("unchecked")
  public ProtCircularBuffer(final Class<Type> p_class, int p_size)
    {
    super(p_class, p_size);
    }

  /**
   * The drop method.
   * 
   * @param p_item
   */

  @Override
  @SuppressWarnings("unchecked")
  protected void drop(final Object p_item)
    {
    System.err
        .println("Warning: Buffer full. Dropped one incoming event!");
    }

  }

File Information:

file name:ProtCircularBuffer.java
package:org.dgpf.search.control.protocol
qualified name:org.dgpf.search.control.protocol.ProtCircularBuffer.java
file type:Java Source File
download location:download http://dgpf.sourceforge.net/source/org/dgpf/search/control/protocol/ProtCircularBuffer.java
size:2.111 KB (2162 B)
uploaded: 2015-07-22 04:11:00 GMT+0000
last update: 2006-09-24 23:47:04 GMT+0000
last access: 2017-11-18 23:19:11 GMT+0000

statistics online since 2006-01-02.   RSS Feed
Contact us by sending an email to tweise@gmx.de to receive further information, to report errors, or to join our project.
All content on this site (http://dgpf.sourceforge.net/) is LGPL-licensed.
http://dgpf.sourceforge.net/scripts/source/source.php last modified at 2015-07-22 04:10:53 GMT+0000 served at 2017-11-18 23:19:11 GMT+0000.
Valid CSS Valid XHTML 1.1
Valid RSS SourceForge.net Logo