org.jlab.coda.et
Class AttachmentLocal

java.lang.Object
  extended byorg.jlab.coda.et.AttachmentLocal

class AttachmentLocal
extends java.lang.Object

This class defines an attachment to a station of an ET system for use by the ET system itself and not the user. Attachments are used to keep track of event ownership and as places to conveniently keep some statistics and other information on the "getting" of events. Attachments can only be created by an ET system's SystemCreate.attach(int) method.


Field Summary
(package private)  long eventsDump
          Number of events dumped (recycled by returning to GRAND_CENTRAL station) by a user through the attachment.
(package private)  long eventsGet
          Number of events gotten by a user from the attachment.
(package private)  long eventsMake
          Number of new events gotten by a user from the attachment.
(package private)  long eventsPut
          Number of events put by a user into the attachment.
(package private)  java.lang.String host
          Name of the host the attachment is residing on.
(package private)  int id
          Unique id number.
(package private)  int pid
          Process id number for attachments written in C language.
(package private)  boolean sleepMode
          Flag telling whether the attachment is currently in the sleep mode of getEvents or newEvents.
(package private)  StationLocal station
          Station the attachment is associated with.
(package private)  boolean waiting
          Flag telling whether the attachment is blocked waiting to read events from a station that has no events.
(package private)  boolean wakeUp
          Flag telling the attachment blocked on a read to wake up or return.
 
Constructor Summary
(package private) AttachmentLocal()
          Attachments are only created by an ET system's SystemCreate.attach(int) method.
 
Method Summary
 int getId()
          Gets the attachment id number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

int id
Unique id number.


pid

int pid
Process id number for attachments written in C language.


host

java.lang.String host
Name of the host the attachment is residing on.


station

StationLocal station
Station the attachment is associated with.


eventsPut

long eventsPut
Number of events put by a user into the attachment.


eventsGet

long eventsGet
Number of events gotten by a user from the attachment.


eventsDump

long eventsDump
Number of events dumped (recycled by returning to GRAND_CENTRAL station) by a user through the attachment.


eventsMake

long eventsMake
Number of new events gotten by a user from the attachment.


waiting

boolean waiting
Flag telling whether the attachment is blocked waiting to read events from a station that has no events.


sleepMode

volatile boolean sleepMode
Flag telling whether the attachment is currently in the sleep mode of getEvents or newEvents. Since the implementation of this mode is done by using the timed wait mode, it occasionally happens that the attachment is told to wake up while it is not actually in getEvents or newEvents. If this flag is true, the command to wake up will go ahead and set "wakeUp" to true - even if "waiting" is false.


wakeUp

volatile boolean wakeUp
Flag telling the attachment blocked on a read to wake up or return.

Constructor Detail

AttachmentLocal

AttachmentLocal()
Attachments are only created by an ET system's SystemCreate.attach(int) method.

Method Detail

getId

public int getId()
Gets the attachment id number.

Returns:
attachment id number