org.jboss.remoting.callback
Class BlockingCallbackStore

java.lang.Object
  extended by org.jboss.remoting.callback.BlockingCallbackStore
All Implemented Interfaces:
SerializableStore

public class BlockingCallbackStore
extends java.lang.Object
implements SerializableStore

This callback store does not persist callback messages when memory is running low, but instead will block the thread making the handle callback call from the server invoker. The intention is that this will throttle the server invoker from generating/sending any more callbacks until client as called to get the in-memory callbacks that have already been collected and memory has been released.

Author:
Tom Elrod

Constructor Summary
BlockingCallbackStore()
           
 
Method Summary
 void add(java.io.Serializable object)
          To be used for adding a callback to the store.
 void create()
          No op
 void destroy()
          No op
 java.lang.Object getNext()
          Will get the first callback that are being held for the client.
 boolean getPurgeOnShutdown()
          No op.
 void purgeFiles()
          No op.
 void setConfig(java.util.Map config)
          No op
 void setPurgeOnShutdown(boolean purgeOnShutdown)
          No op
 int size()
          Gets the number of callbacks that are waiting to be processed.
 void start()
          No op
 void stop()
          No op
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockingCallbackStore

public BlockingCallbackStore()
Method Detail

size

public int size()
Gets the number of callbacks that are waiting to be processed.

Specified by:
size in interface SerializableStore
Returns:

getNext

public java.lang.Object getNext()
                         throws java.io.IOException
Will get the first callback that are being held for the client. This will also release the lock that is holding any threads that have called the add(Serializalbe) method.

Specified by:
getNext in interface SerializableStore
Returns:
Throws:
java.io.IOException

add

public void add(java.io.Serializable object)
         throws java.io.IOException
To be used for adding a callback to the store. The thread making the call will be held until the getNext() method is called.

Specified by:
add in interface SerializableStore
Parameters:
object -
Throws:
java.io.IOException

setConfig

public void setConfig(java.util.Map config)
No op

Specified by:
setConfig in interface SerializableStore
Parameters:
config -

start

public void start()
           throws java.lang.Exception
No op

Specified by:
start in interface SerializableStore
Throws:
java.lang.Exception

stop

public void stop()
No op

Specified by:
stop in interface SerializableStore

create

public void create()
            throws java.lang.Exception
No op

Specified by:
create in interface SerializableStore
Throws:
java.lang.Exception

destroy

public void destroy()
No op

Specified by:
destroy in interface SerializableStore

setPurgeOnShutdown

public void setPurgeOnShutdown(boolean purgeOnShutdown)
No op

Specified by:
setPurgeOnShutdown in interface SerializableStore
Parameters:
purgeOnShutdown -

getPurgeOnShutdown

public boolean getPurgeOnShutdown()
No op. Always returns false.

Specified by:
getPurgeOnShutdown in interface SerializableStore
Returns:

purgeFiles

public void purgeFiles()
No op.

Specified by:
purgeFiles in interface SerializableStore


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.