|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
gr.uoa.di.madgik.grs.store.buffer.FileBufferStore
public class FileBufferStore
Implementation of the IBufferStore which utilizes FileRecordStore instances to store
the Records accessed through the incoming locators
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Nested classes/interfaces inherited from interface gr.uoa.di.madgik.grs.store.buffer.IBufferStore |
|---|
IBufferStore.MultiplexType |
| Field Summary | |
|---|---|
static IBufferStore.MultiplexType |
DefaultMultiplexType
The default IBufferStore.MultiplexType currently set to IBufferStore.MultiplexType.FIFO |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
FileBufferStore()
Create new instance |
|
| Method Summary | |
|---|---|
void |
associateStoreReader(BufferStoreReader reader)
Associates a BufferStoreReader with the IBufferStore that is has been initialized to access. |
void |
dispose()
Disposes all the resources that are internally managed by the IBufferStore |
java.util.ArrayList<BufferStoreEntry> |
getEntries()
Retrieves the BufferStoreEntrys that represent the status for all incoming locators and their respective
readers and status as well as their persistency location and IRecordStores |
long |
getInactivityTimeout()
The timeout of the inactivity period after which the IBufferStore is eligible for disposal. |
java.util.concurrent.TimeUnit |
getInactivityTimeUnit()
The time unit used to define the timeout of the inactivity period after which the IBufferStore is
eligible for disposal. |
java.lang.String |
getKey()
Retrieves the key by which this IBufferStore is registered and referenced through a GRSRegistry |
long |
getLastActivityTime()
Retrieves the last activity time over this IBufferStore |
java.net.URI[] |
getLocators()
Retrieves the locators over which the IBufferStore operates |
java.lang.Object |
getModificationObject()
Retrieves a synchronization object that can be used in a standard wait / notify block to notify requesters of when an additional object has been made available in the underlying storage from the input readers |
IBufferStore.MultiplexType |
getMultiplexType()
Retrieves the IBufferStore.MultiplexType indicating the way the input locators are used and in which order their data is received |
long |
getReaderTimeout()
Retrieves the timeout that should be used by the readers utilized to access the input locators. |
java.util.concurrent.TimeUnit |
getReaderTimeoutTimeUnit()
Retrieves the timeout unit that should be used by the readers utilized to access the input locators. |
void |
initialize()
Make any needed initialization before the IBufferStore.store() is called to start the storing procedure |
void |
markActivity()
Update the last activity time to the current time |
void |
run()
|
void |
setKey(java.lang.String key)
Sets the key by which this IBufferStore is registered and referenced through a GRSRegistry |
void |
setLocators(java.net.URI[] locators)
Sets the incoming locators that should be stored |
void |
setMultiplexType(IBufferStore.MultiplexType multiplex)
Sets the IBufferStore.MultiplexType indicating the way the input locators are used and in which order their data is received |
void |
setReaderTimeout(long timeout)
Sets the timeout that should be used by the readers utilized to access the input locators. |
void |
setReaderTimeoutTimeUnit(java.util.concurrent.TimeUnit unit)
Sets the timeout unit that should be used by the readers utilized to access the input locators. |
void |
store()
Start retrieving data from the input locators and storing them according to the specific IBufferStore implementation |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final IBufferStore.MultiplexType DefaultMultiplexType
IBufferStore.MultiplexType currently set to IBufferStore.MultiplexType.FIFO
| Constructor Detail |
|---|
public FileBufferStore()
| Method Detail |
|---|
public void associateStoreReader(BufferStoreReader reader)
BufferStoreReader with the IBufferStore that is has been initialized to access. On
disposal of the IBufferStore, the associated BufferStoreReaders are also disposed
associateStoreReader in interface IBufferStorereader - the reader to associateIBufferStore.associateStoreReader(gr.uoa.di.madgik.grs.store.buffer.BufferStoreReader)public void setKey(java.lang.String key)
IBufferStore is registered and referenced through a GRSRegistry
setKey in interface IBufferStorekey - the keyIBufferStore.setKey(java.lang.String)public java.lang.String getKey()
IBufferStore is registered and referenced through a GRSRegistry
getKey in interface IBufferStoreIBufferStore.getKey()public java.lang.Object getModificationObject()
getModificationObject in interface IBufferStoreIBufferStore.getModificationObject()public java.util.ArrayList<BufferStoreEntry> getEntries()
BufferStoreEntrys that represent the status for all incoming locators and their respective
readers and status as well as their persistency location and IRecordStores
getEntries in interface IBufferStoreIBufferStore.getEntries()public IBufferStore.MultiplexType getMultiplexType()
IBufferStore.MultiplexType indicating the way the input locators are used and in which order their data is received
getMultiplexType in interface IBufferStoreIBufferStore.getMultiplexType()
public void setMultiplexType(IBufferStore.MultiplexType multiplex)
throws GRS2BufferStoreInvalidOperationException
IBufferStore.MultiplexType indicating the way the input locators are used and in which order their data is received
setMultiplexType in interface IBufferStoremultiplex - the type of multiplex
GRS2BufferStoreInvalidOperationExceptionIBufferStore.setMultiplexType(gr.uoa.di.madgik.grs.store.buffer.IBufferStore.MultiplexType)public long getReaderTimeout()
IBufferStore.getReaderTimeoutTimeUnit()
getReaderTimeout in interface IBufferStoreIBufferStore.getReaderTimeout()public void setReaderTimeout(long timeout)
IBufferStore.setReaderTimeoutTimeUnit(TimeUnit)
setReaderTimeout in interface IBufferStoretimeout - the timeoutIBufferStore.setReaderTimeout(long)public java.util.concurrent.TimeUnit getReaderTimeoutTimeUnit()
IBufferStore.getReaderTimeout()
getReaderTimeoutTimeUnit in interface IBufferStoreIBufferStore.getReaderTimeoutTimeUnit()public void setReaderTimeoutTimeUnit(java.util.concurrent.TimeUnit unit)
IBufferStore.setReaderTimeout(long)
setReaderTimeoutTimeUnit in interface IBufferStoreunit - the timeout time unitIBufferStore.setReaderTimeoutTimeUnit(java.util.concurrent.TimeUnit)public long getInactivityTimeout()
IBufferStore is eligible for disposal. This
value is to be interpreted in conjunction with the value of IBufferStore.getInactivityTimeUnit()
getInactivityTimeout in interface IBufferStoreIBufferStore.getInactivityTimeout()public java.util.concurrent.TimeUnit getInactivityTimeUnit()
IBufferStore is
eligible for disposal. This value is to be interpreted in conjunction with the value of
IBufferStore.getInactivityTimeout()
getInactivityTimeUnit in interface IBufferStoreIBufferStore.getInactivityTimeUnit()public java.net.URI[] getLocators()
IBufferStore operates
getLocators in interface IBufferStoreIBufferStore.getLocators()public long getLastActivityTime()
IBufferStore
getLastActivityTime in interface IBufferStoreIBufferStore.getLastActivityTime()public void markActivity()
markActivity in interface IBufferStoreIBufferStore.markActivity()
public void setLocators(java.net.URI[] locators)
throws GRS2BufferStoreInvalidOperationException
setLocators in interface IBufferStorelocators - the locators which data should be stored
GRS2BufferStoreInvalidOperationExceptionIBufferStore.setLocators(java.net.URI[])
public void initialize()
throws GRS2BufferStoreInvalidOperationException
IBufferStore.store() is called to start the storing procedure
initialize in interface IBufferStoreGRS2BufferStoreInvalidOperationExceptionIBufferStore.initialize()public void store()
IBufferStore implementation
Starts the execution in a daemon background thread
store in interface IBufferStoreIBufferStore.store()public void dispose()
IBufferStore
dispose in interface IBufferStoreIBufferStore.dispose()public void run()
In the context of the execution thread initiated by store() procedure, the thread loads in its
thread of execution the defined IMultiplex implementation and forwards the execution to it. The multiplexing
implementations used are FifoMultiplex and FirstAvailableMultiplex depending on the value of
getMultiplexType()
run in interface java.lang.Runnablerun in class java.lang.ThreadThread.run()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||