class GetArchiveWriteETATask implements ClusterTask<Duration>
{
    private Instant instant;
    private String id;
    private Duration result;

    public GetArchiveWriteETATask() {}

    public GetArchiveWriteETATask( Instant instant, String id )
    {
        this.instant = instant;
        this.id = id;
    }

    @Override
    public void run()
    {<FILL_FUNCTION_BODY>}

    @Override
    public Duration getResult()
    {
        return result;
    }

    @Override
    public void writeExternal( ObjectOutput out ) throws IOException
    {
        ExternalizableUtil.getInstance().writeSerializable( out, instant );
        ExternalizableUtil.getInstance().writeSafeUTF( out, id );
    }

    @Override
    public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
    {
        instant = (Instant) ExternalizableUtil.getInstance().readSerializable( in );
        id = ExternalizableUtil.getInstance().readSafeUTF( in );
    }
}

        final ArchiveManager manager = XMPPServer.getInstance().getArchiveManager();
        result = manager.availabilityETAOnLocalNode( id, instant );
    
<no_super_class>