Class SpaceLet

java.lang.Object
org.jpos.q2.QBeanSupport
org.jpos.q2.qbean.SpaceLet
All Implemented Interfaces:
AutoCloseable, Configurable, QBean, QBeanSupportMBean, QPersist, Space

public class SpaceLet extends QBeanSupport implements Space
  • Constructor Details

  • Method Details

    • initService

      public void initService() throws ConfigurationException
      Overrides:
      initService in class QBeanSupport
      Throws:
      ConfigurationException
    • startService

      public void startService()
      Overrides:
      startService in class QBeanSupport
    • stopService

      public void stopService()
      Overrides:
      stopService in class QBeanSupport
    • out

      public void out(Object key, Object value)
      Description copied from interface: Space
      Write a new entry into the Space
      Specified by:
      out in interface Space
      Parameters:
      key - Entry's key
      value - Object value
    • out

      public void out(Object key, Object value, long timeout)
      Description copied from interface: Space
      Write a new entry into the Space, with an timeout value
      Specified by:
      out in interface Space
      Parameters:
      key - Entry's key
      value - Object value
      timeout - timeout value in millis
    • push

      public void push(Object key, Object value)
      Description copied from interface: Space
      Write a new entry at the head of a queue.
      Specified by:
      push in interface Space
      Parameters:
      key - Entry's key
      value - Object value
    • push

      public void push(Object key, Object value, long timeout)
      Description copied from interface: Space
      Write a new entry at the head of the queue with a timeout value
      Specified by:
      push in interface Space
      Parameters:
      key - Entry's key
      value - Object value
      timeout - timeout value in millis
    • put

      public void put(Object key, Object value)
      Description copied from interface: Space
      Write a single entry at the head of the queue discarding the other entries
      Specified by:
      put in interface Space
      Parameters:
      key - Entry's key
      value - Object value
    • put

      public void put(Object key, Object value, long timeout)
      Description copied from interface: Space
      Write a single entry at the head of the queue discarding the other entries, with timeout.
      Specified by:
      put in interface Space
      Parameters:
      key - Entry's key
      value - Object value
      timeout - timeout value in millis
    • in

      public Object in(Object key)
      Description copied from interface: Space
      Take an entry from the space, waiting forever until one exists.
      Specified by:
      in in interface Space
      Parameters:
      key - Entry's key
      Returns:
      value
    • rd

      public Object rd(Object key)
      Description copied from interface: Space
      Read an entry from the space, waiting forever until one exists.
      Specified by:
      rd in interface Space
      Parameters:
      key - Entry's key
      Returns:
      value
    • in

      public Object in(Object key, long timeout)
      Description copied from interface: Space
      Take an entry from the space, waiting a limited amount of time until one exists.
      Specified by:
      in in interface Space
      Parameters:
      key - Entry's key
      timeout - millis to wait
      Returns:
      value or null
    • rd

      public Object rd(Object key, long timeout)
      Description copied from interface: Space
      Read an entry from the space, waiting a limited amount of time until one exists.
      Specified by:
      rd in interface Space
      Parameters:
      key - Entry's key
      timeout - millis to wait
      Returns:
      value or null
    • inp

      public Object inp(Object key)
      Description copied from interface: Space
      In probe takes an entry from the space if one exists, return null otherwise.
      Specified by:
      inp in interface Space
      Parameters:
      key - Entry's key
      Returns:
      value or null
    • rdp

      public Object rdp(Object key)
      Description copied from interface: Space
      Read probe reads an entry from the space if one exists, return null otherwise.
      Specified by:
      rdp in interface Space
      Parameters:
      key - Entry's key
      Returns:
      value or null
    • existAny

      public boolean existAny(Object[] keys)
      Specified by:
      existAny in interface Space
      Parameters:
      keys - array of keys to check
      Returns:
      true if one or more keys are available in the space
    • existAny

      public boolean existAny(Object[] keys, long timeout)
      Specified by:
      existAny in interface Space
      Parameters:
      keys - array of keys to check
      timeout - to wait for any of the entries to become available in millis
      Returns:
      true if one or more keys are available in the space
    • nrd

      public void nrd(Object key)
      Description copied from interface: Space
      Nrd (not read) waits forever until Key is not present in space.
      Resolution for expiring entries is implementation dependant, but a minimum one-second is suggested.
      Specified by:
      nrd in interface Space
      Parameters:
      key - Entry's key
    • nrd

      public Object nrd(Object key, long timeout)
      Description copied from interface: Space
      Nrd (not read) waits up to timeout until Key is not present in space.
      Resolution for expiring entries is implementation dependant, but a minimum one-second is suggested.
      Specified by:
      nrd in interface Space
      Parameters:
      key - Entry's key
      timeout - millis to wait
      Returns:
      value or null