|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgr.uoa.di.madgik.grs.proxy.local.LocalReaderProxy
public class LocalReaderProxy
This proxy is an implementation of the IReaderProxy interface available to be
used by readers that want to access an IBuffer made available by a writer
that is collocated in the same JVM as they are
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.grs.proxy.IProxy |
|---|
IProxy.ProxyType |
| Field Summary |
|---|
| Fields inherited from interface gr.uoa.di.madgik.grs.proxy.IProxy |
|---|
ProxyScheme, ProxyStoreScheme |
| Constructor Summary | |
|---|---|
LocalReaderProxy()
Creates a new instance |
|
| Method Summary | |
|---|---|
void |
fromLocator(java.net.URI locator)
Populates an instance of the IReaderProxy implementer with the information
provided through the specific locator URI |
IBuffer |
getBuffer()
After the proxy has been initialized, through this method, the IBuffer that
can be used by the reader to access the writer side IBuffer can be retrieved |
static boolean |
isOfType(java.net.URI locator)
Checks if the provided URI is of a type that can be managed by an instance of this class. |
void |
overrideBufferCapacity(int capacity)
After the proxy has been initialized, this method can be used to provide a hint to the IReaderProxy to use a capacity different than that of the producer's buffer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalReaderProxy()
| Method Detail |
|---|
public void fromLocator(java.net.URI locator)
throws GRS2ProxyInvalidArgumentException,
GRS2ProxyInvalidOperationException
IReaderProxy implementer with the information
provided through the specific locator URI
This method parses the provided URI to retrieve the needed information. An example of the URI
this proxy can manage is grs2-proxy://localhost?key=13bc140f-3013-4ce1-83b4-4d57d46863b0#Local
fromLocator in interface IReaderProxyGRS2ProxyInvalidOperationException - if the proxy has already been initialized
GRS2ProxyInvalidArgumentException - if the provided locator is null or empty, or
the parsed information is not validIReaderProxy.fromLocator(java.net.URI)public void overrideBufferCapacity(int capacity)
IReaderProxy to use a capacity different than that of the producer's buffer.
Whether or not this hint is taken into account depends on the IReaderProxy implementation.
For example, it is highly unlikely that it will be honored in cases when both the producer and
the consumer run into the same address space.
Performs no action, as the LocalReaderProxy retrieves the IBuffer directly from the
local GRSRegistry
overrideBufferCapacity in interface IReaderProxyIReaderProxy.overrideBufferCapacity(int)
public IBuffer getBuffer()
throws GRS2ProxyInvalidOperationException
IBuffer that
can be used by the reader to access the writer side IBuffer can be retrieved
Retrieves the IBuffer directly from the local GRSRegistry. If no IBuffer
is found associated with the provided key, null is returned
getBuffer in interface IReaderProxyIBuffer that is serving the reader
GRS2ProxyInvalidOperationException - if the provided locator that populated this
instance has not set the needed parametersIReaderProxy.getBuffer()public static boolean isOfType(java.net.URI locator)
grs2-proxy://localhost?key=13bc140f-3013-4ce1-83b4-4d57d46863b0#Local
locator - the locator URi that needs to be checked
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||