gr.uoa.di.madgik.grs.proxy.local
Class LocalStoreWriterProxy

java.lang.Object
  extended by gr.uoa.di.madgik.grs.proxy.local.LocalStoreWriterProxy
All Implemented Interfaces:
IProxy

public class LocalStoreWriterProxy
extends java.lang.Object
implements IProxy

This proxy class although it implements the tagging IProxy interface, it does not implement, as the name suggests, the IWriterProxy interface. The reason for this is that it is meant to be used for a special case of IBuffer publishing which is through the buffer store utility provided. This proxy class can be used to create a locator URI pointing to a stored IBuffer that contains all the Records available through the provided URI locators.

Author:
gpapanikos

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
LocalStoreWriterProxy()
           
 
Method Summary
static java.net.URI store(java.net.URI[] locators, IBufferStore.MultiplexType multiplex, long timeout, java.util.concurrent.TimeUnit unit)
          This method instantiates an IBufferStore through the BufferStoreFactory, sets the respective information provided, initializes the IBufferStore, registers the new store and creates a locator URI that can be used to access the IBufferStore.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalStoreWriterProxy

public LocalStoreWriterProxy()
Method Detail

store

public static java.net.URI store(java.net.URI[] locators,
                                 IBufferStore.MultiplexType multiplex,
                                 long timeout,
                                 java.util.concurrent.TimeUnit unit)
                          throws GRS2BufferStoreException,
                                 GRS2ProxyInvalidArgumentException
This method instantiates an IBufferStore through the BufferStoreFactory, sets the respective information provided, initializes the IBufferStore, registers the new store and creates a locator URI that can be used to access the IBufferStore. The created locator is of the following type grs2-store-proxy://localhost?key=e064140f-4bcc-4c84-94c6-9420f8f31b05#LocalStore and uses the scheme defined in IProxy.ProxyStoreScheme

Parameters:
locators - The locators forwarded to the IBufferStore.setLocators(URI[])
multiplex - The multiplex type forwarded to IBufferStore.setMultiplexType(gr.uoa.di.madgik.grs.store.buffer.IBufferStore.MultiplexType)
timeout - The timeout forwarded to IBufferStore.setReaderTimeout(long)
unit - The timeout time unit forwarded to IBufferStore.setReaderTimeoutTimeUnit(TimeUnit)
Returns:
the locator URI to the IBufferStore serving the new IBuffer
Throws:
GRS2BufferStoreException - the IBufferStore could not be initialized
GRS2ProxyInvalidArgumentException - the locator URI could not be created